TEST-INFRA: [test-architecture] Refactor Robot Framework tests to use custom libraries instead of helper scripts #3629

Open
opened 2026-04-05 20:57:45 +00:00 by freemo · 0 comments
Owner

Metadata

  • Branch: refactor/test-architecture/robot-custom-libraries
  • Commit Message: refactor(test-architecture): replace Robot Framework helper scripts with custom keyword libraries
  • Milestone: N/A — Backlog
  • Parent Epic: #2810

Background and context

Some of the Robot Framework tests in the robot/ directory rely on external Python helper scripts to execute the test logic. For example, the tests in robot/skill_registry.robot call the robot/helper_skill_registry.py script to interact with the application and perform assertions.

While this approach works, it has several drawbacks that impact the readability, maintainability, and reusability of the tests.

Current behavior

  • Test logic is hidden: The core logic of the tests is located in external Python scripts, making it difficult to understand the test flow without switching between the .robot file and the .py file.
  • Reduced readability: The Robot Framework files become less expressive and look like simple command launchers, which defeats the purpose of using a BDD-style framework.
  • Increased complexity: This approach introduces an extra layer of complexity, as developers need to maintain both the Robot Framework files and the helper scripts.
  • Reduced reusability: The test logic is not implemented as Robot Framework keywords, which makes it difficult to reuse across different test suites.

Expected behavior

  • Robot Framework tests should be self-contained and readable.
  • Test logic should be implemented as custom Robot Framework keywords in Python libraries.
  • Helper scripts should be replaced with custom Robot Framework libraries.

Subtasks

  • Identify all Robot Framework tests that use external helper scripts.
  • Create custom Robot Framework libraries in Python to encapsulate the test logic from the helper scripts.
  • Refactor the Robot Framework tests to use the new custom libraries and keywords.
  • Remove the old helper scripts.
  • Run nox (all default sessions), fix any errors.
  • Verify coverage >= 97% via nox -s coverage_report.

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly.
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.
  • All nox stages pass.
  • Coverage >= 97%.

Backlog note: This issue was discovered during autonomous operation
on milestone v3.7.0. It does not block milestone completion and has been
placed in the backlog for human review and future milestone assignment.


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

## Metadata - **Branch**: `refactor/test-architecture/robot-custom-libraries` - **Commit Message**: `refactor(test-architecture): replace Robot Framework helper scripts with custom keyword libraries` - **Milestone**: N/A — Backlog - **Parent Epic**: #2810 ## Background and context Some of the Robot Framework tests in the `robot/` directory rely on external Python helper scripts to execute the test logic. For example, the tests in `robot/skill_registry.robot` call the `robot/helper_skill_registry.py` script to interact with the application and perform assertions. While this approach works, it has several drawbacks that impact the readability, maintainability, and reusability of the tests. ## Current behavior - **Test logic is hidden:** The core logic of the tests is located in external Python scripts, making it difficult to understand the test flow without switching between the `.robot` file and the `.py` file. - **Reduced readability:** The Robot Framework files become less expressive and look like simple command launchers, which defeats the purpose of using a BDD-style framework. - **Increased complexity:** This approach introduces an extra layer of complexity, as developers need to maintain both the Robot Framework files and the helper scripts. - **Reduced reusability:** The test logic is not implemented as Robot Framework keywords, which makes it difficult to reuse across different test suites. ## Expected behavior - Robot Framework tests should be self-contained and readable. - Test logic should be implemented as custom Robot Framework keywords in Python libraries. - Helper scripts should be replaced with custom Robot Framework libraries. ## Subtasks - [ ] Identify all Robot Framework tests that use external helper scripts. - [ ] Create custom Robot Framework libraries in Python to encapsulate the test logic from the helper scripts. - [ ] Refactor the Robot Framework tests to use the new custom libraries and keywords. - [ ] Remove the old helper scripts. - [ ] Run `nox` (all default sessions), fix any errors. - [ ] Verify coverage >= 97% via `nox -s coverage_report`. ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. - All nox stages pass. - Coverage >= 97%. > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.7.0. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. --- **Automated by CleverAgents Bot** Supervisor: Test Infrastructure | Agent: ca-new-issue-creator
freemo added this to the v3.7.0 milestone 2026-04-05 21:01:02 +00:00
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#3629
No description provided.