refactor(tests): organize robot/ test directory into domain-based subdirectories #10706

Open
opened 2026-04-19 06:50:32 +00:00 by HAL9000 · 0 comments
Owner

Summary

The robot/ directory contains 319 .robot test files and 268 helper_*.py files all in a single flat directory (587 files total). Only e2e/, fixtures/, and scripts/ are subdirectories. This flat structure makes navigation, maintenance, and understanding of test scope extremely difficult.

Problem

Current structure:

robot/
├── e2e/          (19 files)
├── fixtures/     (12 files)
├── scripts/      (6 files)
├── *.robot       (319 files — all in root!)
├── helper_*.py   (268 files — all in root!)
├── *.py          (other utilities)
└── *.resource    (shared resources)

With 587 files in a single directory:

  • Finding tests for a specific domain requires scanning all 319 robot files
  • Helper files are not co-located with their test files
  • No visual grouping by domain area
  • Difficult to run tests for a specific subsystem

Proposed Structure

robot/
├── e2e/              (existing — E2E tests)
├── fixtures/         (existing — test fixtures)
├── scripts/          (existing — test utilities)
├── common.resource   (shared keywords)
├── common_vars.py    (shared variables)
├── actor/            (actor_*.robot + helper_actor_*.py)
├── plan/             (plan_*.robot + helper_plan_*.py)
├── resource/         (resource_*.robot + helper_resource_*.py)
├── skill/            (skill_*.robot + helper_skill_*.py)
├── tool/             (tool_*.robot + helper_tool_*.py)
├── cli/              (cli_*.robot + helper_cli_*.py)
├── security/         (security_*.robot + helper_security_*.py)
├── tdd/              (tdd_*.robot + helper_tdd_*.py)
└── ...

Subtasks

  • Define a subdirectory taxonomy for robot/ based on domain areas
  • Move robot test files and their corresponding helper files into appropriate subdirectories
  • Update any cross-file resource imports in .robot files (e.g., Resource ../common.resource)
  • Verify nox -s integration_tests passes after reorganization (pabot already scans robot/ recursively)
  • Verify nox -s e2e_tests passes after reorganization
  • Update CONTRIBUTING.md if it references specific robot file paths

Definition of Done

  • robot/ root directory contains ≤20 files (only shared resources and utilities)
  • All robot test files are organized in domain subdirectories
  • nox -s integration_tests passes
  • nox -s e2e_tests passes

Metadata

  • Branch: refactor/robot-directory-organization
  • Commit Message: refactor(tests): organize robot/ test directory into domain-based subdirectories

Duplicate Check

Searched open and closed issues for: "robot directory", "test organization", "flat structure", "subdirectory". No duplicates found.


Automated by CleverAgents Bot
Supervisor: Implementation Pool | Agent: implementation-worker

## Summary The `robot/` directory contains 319 `.robot` test files and 268 `helper_*.py` files all in a single flat directory (587 files total). Only `e2e/`, `fixtures/`, and `scripts/` are subdirectories. This flat structure makes navigation, maintenance, and understanding of test scope extremely difficult. ## Problem Current structure: ``` robot/ ├── e2e/ (19 files) ├── fixtures/ (12 files) ├── scripts/ (6 files) ├── *.robot (319 files — all in root!) ├── helper_*.py (268 files — all in root!) ├── *.py (other utilities) └── *.resource (shared resources) ``` With 587 files in a single directory: - Finding tests for a specific domain requires scanning all 319 robot files - Helper files are not co-located with their test files - No visual grouping by domain area - Difficult to run tests for a specific subsystem ## Proposed Structure ``` robot/ ├── e2e/ (existing — E2E tests) ├── fixtures/ (existing — test fixtures) ├── scripts/ (existing — test utilities) ├── common.resource (shared keywords) ├── common_vars.py (shared variables) ├── actor/ (actor_*.robot + helper_actor_*.py) ├── plan/ (plan_*.robot + helper_plan_*.py) ├── resource/ (resource_*.robot + helper_resource_*.py) ├── skill/ (skill_*.robot + helper_skill_*.py) ├── tool/ (tool_*.robot + helper_tool_*.py) ├── cli/ (cli_*.robot + helper_cli_*.py) ├── security/ (security_*.robot + helper_security_*.py) ├── tdd/ (tdd_*.robot + helper_tdd_*.py) └── ... ``` ## Subtasks - [ ] Define a subdirectory taxonomy for `robot/` based on domain areas - [ ] Move robot test files and their corresponding helper files into appropriate subdirectories - [ ] Update any cross-file resource imports in `.robot` files (e.g., `Resource ../common.resource`) - [ ] Verify `nox -s integration_tests` passes after reorganization (pabot already scans `robot/` recursively) - [ ] Verify `nox -s e2e_tests` passes after reorganization - [ ] Update CONTRIBUTING.md if it references specific robot file paths ## Definition of Done - `robot/` root directory contains ≤20 files (only shared resources and utilities) - All robot test files are organized in domain subdirectories - `nox -s integration_tests` passes - `nox -s e2e_tests` passes ## Metadata - **Branch:** `refactor/robot-directory-organization` - **Commit Message:** `refactor(tests): organize robot/ test directory into domain-based subdirectories` ## Duplicate Check Searched open and closed issues for: "robot directory", "test organization", "flat structure", "subdirectory". No duplicates found. --- **Automated by CleverAgents Bot** Supervisor: Implementation Pool | Agent: implementation-worker
HAL9000 added this to the v3.9.0 milestone 2026-04-19 06:50:32 +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.

Dependencies

No dependencies set.

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