TEST-INFRA: [test-architecture] Organize Behave feature files into subdirectories #1795

Open
opened 2026-04-02 23:51:49 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: chore/test-architecture-organize-behave-feature-subdirs
  • Commit Message: chore(test-infra): organize Behave feature files into functional subdirectories
  • Milestone: v3.8.0
  • Parent Epic: #1678

Background and Context

The Behave feature files in the features/ directory are currently organized in a flat structure. As the number of feature files grows, this flat layout makes it increasingly difficult to locate specific features, understand the overall structure of the test suite, and reason about which functional areas are covered. Grouping feature files into subdirectories by functional area improves navigability, enforces separation of concerns, and aligns with the BDD Test Organization Guidelines in CONTRIBUTING.md.

Expected Behavior

Feature files are organized into clearly named subdirectories under features/ that correspond to the major functional areas of the project. The Behave test runner is configured to discover and execute all feature files recursively, so the full test suite continues to run without manual intervention.

Acceptance Criteria

  • Each major functional area of the project has a corresponding subdirectory under features/.
  • All existing Behave feature files are moved into the appropriate subdirectory.
  • The Behave test runner (via the project's task runner / nox) discovers and runs all feature files recursively after the reorganization.
  • No feature files are lost or left in the root features/ directory (except any top-level configuration files that must remain there).
  • All Behave scenarios pass after the reorganization.

Supporting Information

  • Related issue: #1769 (TEST-INFRA: [test-architecture] Repository cleveragents/cleveragents-core is empty — now closed)
  • Parent Epic: #1678 (CI Execution Time Optimization — Timeouts, Concurrency, and Coverage Artifact Sharing)
  • CONTRIBUTING.md BDD Test Organization Guidelines require feature files to be grouped by behavior and purpose.

Subtasks

  • Audit all existing Behave feature files in features/ and map each to a functional area
  • Create subdirectories in features/ for each identified functional area
  • Move existing Behave feature files into the appropriate subdirectories
  • Update the Behave test runner configuration (nox session and/or behave.ini / setup.cfg) to recursively discover feature files in subdirectories
  • Verify all Behave scenarios pass after reorganization via the project task runner
  • Run nox (all default sessions) and 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.
  • Behave feature files are organized into subdirectories based on functionality — no feature files remain in the flat root features/ directory.
  • The Behave test suite runs successfully (all scenarios pass) after the reorganization.
  • 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%.

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

## Metadata - **Branch**: `chore/test-architecture-organize-behave-feature-subdirs` - **Commit Message**: `chore(test-infra): organize Behave feature files into functional subdirectories` - **Milestone**: v3.8.0 - **Parent Epic**: #1678 ## Background and Context The Behave feature files in the `features/` directory are currently organized in a flat structure. As the number of feature files grows, this flat layout makes it increasingly difficult to locate specific features, understand the overall structure of the test suite, and reason about which functional areas are covered. Grouping feature files into subdirectories by functional area improves navigability, enforces separation of concerns, and aligns with the BDD Test Organization Guidelines in CONTRIBUTING.md. ## Expected Behavior Feature files are organized into clearly named subdirectories under `features/` that correspond to the major functional areas of the project. The Behave test runner is configured to discover and execute all feature files recursively, so the full test suite continues to run without manual intervention. ## Acceptance Criteria - Each major functional area of the project has a corresponding subdirectory under `features/`. - All existing Behave feature files are moved into the appropriate subdirectory. - The Behave test runner (via the project's task runner / nox) discovers and runs all feature files recursively after the reorganization. - No feature files are lost or left in the root `features/` directory (except any top-level configuration files that must remain there). - All Behave scenarios pass after the reorganization. ## Supporting Information - Related issue: #1769 (TEST-INFRA: [test-architecture] Repository cleveragents/cleveragents-core is empty — now closed) - Parent Epic: #1678 (CI Execution Time Optimization — Timeouts, Concurrency, and Coverage Artifact Sharing) - CONTRIBUTING.md BDD Test Organization Guidelines require feature files to be grouped by behavior and purpose. ## Subtasks - [ ] Audit all existing Behave feature files in `features/` and map each to a functional area - [ ] Create subdirectories in `features/` for each identified functional area - [ ] Move existing Behave feature files into the appropriate subdirectories - [ ] Update the Behave test runner configuration (nox session and/or `behave.ini` / `setup.cfg`) to recursively discover feature files in subdirectories - [ ] Verify all Behave scenarios pass after reorganization via the project task runner - [ ] Run `nox` (all default sessions) and 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. - [ ] Behave feature files are organized into subdirectories based on functionality — no feature files remain in the flat root `features/` directory. - [ ] The Behave test suite runs successfully (all scenarios pass) after the reorganization. - [ ] 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%. --- **Automated by CleverAgents Bot** Supervisor: Test Infrastructure | Agent: ca-new-issue-creator
freemo added this to the v3.8.0 milestone 2026-04-02 23:52:01 +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
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#1795
No description provided.