TEST-INFRA: [test-architecture] Refactor complex Robot helper files #1963

Open
opened 2026-04-03 00:24:50 +00:00 by freemo · 3 comments
Owner

Metadata

  • Branch: refactor/test-arch-simplify-robot-helper-files
  • Commit Message: refactor(tests): break down large Robot helper files into smaller, focused modules
  • Milestone: v3.2.0
  • Parent Epic: #1678

Background and Context

The Robot test suite relies on a large number of complex helper files. The results show that there are several very large helper files, with some exceeding 900 lines of code. This is a strong indication that the Robot tests are overly complex and contain a lot of custom logic.

Large, complex helper files are a sign of a poor test architecture. They make the tests harder to understand, maintain, and debug. They also suggest that the tests are not well-structured and that there may be a lot of duplicated code within the helper files themselves.

It is recommended that the team:

  1. Review the largest and most complex helper files to identify opportunities for simplification and refactoring.
  2. Break down large helper files into smaller, more focused modules.
  3. Look for opportunities to replace custom logic with existing Robot Framework libraries or by using a more data-driven approach.
  4. Establish guidelines for writing helper files to ensure that they remain small, focused, and easy to understand.

Subtasks

  • Audit all Robot helper files and rank by line count / complexity
  • Identify and document duplication across helper files
  • Break down helper files exceeding an agreed line-count threshold into smaller, focused modules
  • Replace custom logic with standard Robot Framework libraries where applicable
  • Introduce a data-driven approach where custom logic can be eliminated
  • Document helper file authoring guidelines in CONTRIBUTING.md
  • Verify all Robot integration tests still pass after refactoring (nox -e integration_tests)

Definition of Done

  • No Robot helper file exceeds the agreed line-count threshold
  • Duplicated logic across helper files has been consolidated
  • All refactored helpers are covered by the existing Robot test suite with no regressions
  • Helper file guidelines are documented in CONTRIBUTING.md
  • All nox stages pass
  • Coverage >= 97%

Automated by CleverAgents Bot
Supervisor: Test Infrastructure | Agent: ca-new-issue-creator

## Metadata - **Branch**: `refactor/test-arch-simplify-robot-helper-files` - **Commit Message**: `refactor(tests): break down large Robot helper files into smaller, focused modules` - **Milestone**: v3.2.0 - **Parent Epic**: #1678 ## Background and Context The Robot test suite relies on a large number of complex helper files. The results show that there are several very large helper files, with some exceeding 900 lines of code. This is a strong indication that the Robot tests are overly complex and contain a lot of custom logic. Large, complex helper files are a sign of a poor test architecture. They make the tests harder to understand, maintain, and debug. They also suggest that the tests are not well-structured and that there may be a lot of duplicated code within the helper files themselves. It is recommended that the team: 1. Review the largest and most complex helper files to identify opportunities for simplification and refactoring. 2. Break down large helper files into smaller, more focused modules. 3. Look for opportunities to replace custom logic with existing Robot Framework libraries or by using a more data-driven approach. 4. Establish guidelines for writing helper files to ensure that they remain small, focused, and easy to understand. ## Subtasks - [ ] Audit all Robot helper files and rank by line count / complexity - [ ] Identify and document duplication across helper files - [ ] Break down helper files exceeding an agreed line-count threshold into smaller, focused modules - [ ] Replace custom logic with standard Robot Framework libraries where applicable - [ ] Introduce a data-driven approach where custom logic can be eliminated - [ ] Document helper file authoring guidelines in `CONTRIBUTING.md` - [ ] Verify all Robot integration tests still pass after refactoring (`nox -e integration_tests`) ## Definition of Done - [ ] No Robot helper file exceeds the agreed line-count threshold - [ ] Duplicated logic across helper files has been consolidated - [ ] All refactored helpers are covered by the existing Robot test suite with no regressions - [ ] Helper file guidelines are documented in `CONTRIBUTING.md` - [ ] All nox stages pass - [ ] Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: Test Infrastructure | Agent: ca-new-issue-creator
freemo added this to the v3.2.0 milestone 2026-04-03 00:25:02 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • MoSCoW: MoSCoW/Could Have — CI/test infrastructure improvement.

Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: ca-project-owner

Issue triaged by project owner: - **State**: Verified - **MoSCoW**: MoSCoW/Could Have — CI/test infrastructure improvement. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
Author
Owner

Label compliance fix applied:

  • Removed conflicting label: State/Unverified
  • Reason: This issue had both State/Unverified and State/Verified simultaneously, which is contradictory. Per CONTRIBUTING.md, an issue should have exactly one State/* label. Since State/Verified is the more advanced state, State/Unverified has been removed.

Automated by CleverAgents Bot
Supervisor: Backlog Grooming | Agent: ca-backlog-groomer

Label compliance fix applied: - Removed conflicting label: `State/Unverified` - Reason: This issue had both `State/Unverified` and `State/Verified` simultaneously, which is contradictory. Per CONTRIBUTING.md, an issue should have exactly one `State/*` label. Since `State/Verified` is the more advanced state, `State/Unverified` has been removed. --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: ca-backlog-groomer
freemo removed this from the v3.2.0 milestone 2026-04-06 22:31:04 +00:00
Author
Owner

This issue has been moved to the backlog as part of an aggressive grooming of the v3.2.0 milestone. It has been deemed non-critical for the minimal viability of the milestone and will be addressed in a future release.

This issue has been moved to the backlog as part of an aggressive grooming of the v3.2.0 milestone. It has been deemed non-critical for the minimal viability of the milestone and will be addressed in a future release.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
cleveragents/cleveragents-core#1963
No description provided.