TEST-INFRA: [test-architecture] Split long feature files #1872

Open
opened 2026-04-03 00:03:18 +00:00 by freemo · 2 comments
Owner

Metadata

  • Branch: chore/test-arch-split-long-feature-files
  • Commit Message: chore(tests): split long feature files into smaller, focused feature files
  • Milestone: v3.2.0
  • Parent Epic: #739

Background and Context

Some feature files in the features/ directory are very long and contain many scenarios. This makes them difficult to read and maintain. For example, a2a_facade_coverage.feature has 28 scenarios.

Per CONTRIBUTING.md, the BDD test organisation guidelines require that feature files are well-organised and maintainable. Long feature files with many unrelated scenarios violate the single-responsibility principle and make it harder for contributors to understand the scope of each feature file at a glance.

These long feature files should be split into smaller, more focused feature files. This will improve the readability and maintainability of the test suite.

Expected Behavior

Each feature file should be focused on a single, cohesive area of behavior. Feature files with more than 15 scenarios should be reviewed and split into smaller, more focused files where appropriate.

Acceptance Criteria

  • All feature files with more than 15 scenarios have been identified
  • Each identified long feature file has been split into smaller, more focused feature files
  • All step definition files are updated to match the new feature file structure
  • All tests pass after the split (nox -s unit_tests runs to completion)
  • Coverage remains >= 97%

Supporting Information

  • CONTRIBUTING.md BDD Test Organisation Guidelines: "Name feature-specific step files after their feature" and "Keep shared steps in purpose-driven modules"
  • Related test-architecture issues: #1847, #1864

Subtasks

  • Identify all feature files with more than 15 scenarios
  • For each long feature file, create a plan to split it into smaller, more focused feature files
  • Create new feature files and move the scenarios from the old file to the new files
  • Update the step definition files to match the new feature file structure
  • Run nox -s unit_tests to ensure that everything is still working correctly
  • Run full nox suite and confirm all sessions pass
  • Verify coverage >= 97% via nox -s coverage_report

Definition of Done

This issue is complete when:

  • All long feature files have been split into smaller, more focused feature files
  • All step definition files are updated to match the new feature file structure
  • All tests are passing
  • All nox stages pass
  • Coverage >= 97%
  • 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

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

## Metadata - **Branch**: `chore/test-arch-split-long-feature-files` - **Commit Message**: `chore(tests): split long feature files into smaller, focused feature files` - **Milestone**: v3.2.0 - **Parent Epic**: #739 ## Background and Context Some feature files in the `features/` directory are very long and contain many scenarios. This makes them difficult to read and maintain. For example, `a2a_facade_coverage.feature` has 28 scenarios. Per `CONTRIBUTING.md`, the BDD test organisation guidelines require that feature files are well-organised and maintainable. Long feature files with many unrelated scenarios violate the single-responsibility principle and make it harder for contributors to understand the scope of each feature file at a glance. These long feature files should be split into smaller, more focused feature files. This will improve the readability and maintainability of the test suite. ## Expected Behavior Each feature file should be focused on a single, cohesive area of behavior. Feature files with more than 15 scenarios should be reviewed and split into smaller, more focused files where appropriate. ## Acceptance Criteria - [ ] All feature files with more than 15 scenarios have been identified - [ ] Each identified long feature file has been split into smaller, more focused feature files - [ ] All step definition files are updated to match the new feature file structure - [ ] All tests pass after the split (`nox -s unit_tests` runs to completion) - [ ] Coverage remains >= 97% ## Supporting Information - `CONTRIBUTING.md` BDD Test Organisation Guidelines: "Name feature-specific step files after their feature" and "Keep shared steps in purpose-driven modules" - Related test-architecture issues: #1847, #1864 ## Subtasks - [ ] Identify all feature files with more than 15 scenarios - [ ] For each long feature file, create a plan to split it into smaller, more focused feature files - [ ] Create new feature files and move the scenarios from the old file to the new files - [ ] Update the step definition files to match the new feature file structure - [ ] Run `nox -s unit_tests` to ensure that everything is still working correctly - [ ] Run full `nox` suite and confirm all sessions pass - [ ] Verify coverage >= 97% via `nox -s coverage_report` ## Definition of Done This issue is complete when: - [ ] All long feature files have been split into smaller, more focused feature files - [ ] All step definition files are updated to match the new feature file structure - [ ] All tests are passing - [ ] All nox stages pass - [ ] Coverage >= 97% - [ ] 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 --- **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:03:33 +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

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#1872
No description provided.