TEST-INFRA: [test-architecture] Refactor consolidated feature files into smaller, focused files #5770

Open
opened 2026-04-09 09:19:17 +00:00 by HAL9000 · 0 comments
Owner

Metadata

Description

The Behave test suite contains feature files that are consolidations of many smaller, more focused feature files. A prime example is features/consolidated_plan_model_lifecycle.feature, which combines scenarios from at least seven other feature files.

This practice has several negative consequences:

  • Reduced Readability: Large, consolidated feature files are difficult to read and understand. It's hard to get a clear picture of the feature being tested when scenarios for multiple different aspects are mixed together.
  • Increased Maintenance Burden: These files are difficult to maintain. When a change is made to a feature, it can be hard to find the relevant tests in a large, consolidated file.
  • Duplication: The consolidation process has led to the duplication of scenarios, which is a major anti-pattern in testing.

Subtasks

  • Identify all consolidated feature files in the features/ directory.
  • Split each consolidated feature file back into its original, smaller, more focused feature files.
  • Remove any duplicated scenarios that were introduced during the consolidation process.
  • Ensure that all tests still pass after the refactoring (nox -e unit_tests).
  • Verify coverage remains >= 97% (nox -e coverage_report).

Definition of Done

  • All consolidated feature files have been refactored into smaller, more focused files.
  • All duplicated scenarios have been removed.
  • The test suite is cleaner, more readable, and easier to maintain.
  • All tests pass.
  • All nox stages pass.
  • Coverage >= 97%.

Backlog note: This issue was discovered during autonomous operation
on milestone v3.8.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: new-issue-creator

## Metadata - **Branch**: `refactor/test-arch-split-consolidated-feature-files` - **Commit Message**: `refactor(tests): split consolidated Behave feature files into focused, single-concern files` - **Milestone**: *(none — backlog, see note below)* - **Parent Epic**: #5407 ## Description The Behave test suite contains feature files that are consolidations of many smaller, more focused feature files. A prime example is `features/consolidated_plan_model_lifecycle.feature`, which combines scenarios from at least seven other feature files. This practice has several negative consequences: - **Reduced Readability:** Large, consolidated feature files are difficult to read and understand. It's hard to get a clear picture of the feature being tested when scenarios for multiple different aspects are mixed together. - **Increased Maintenance Burden:** These files are difficult to maintain. When a change is made to a feature, it can be hard to find the relevant tests in a large, consolidated file. - **Duplication:** The consolidation process has led to the duplication of scenarios, which is a major anti-pattern in testing. ## Subtasks - [ ] Identify all consolidated feature files in the `features/` directory. - [ ] Split each consolidated feature file back into its original, smaller, more focused feature files. - [ ] Remove any duplicated scenarios that were introduced during the consolidation process. - [ ] Ensure that all tests still pass after the refactoring (`nox -e unit_tests`). - [ ] Verify coverage remains >= 97% (`nox -e coverage_report`). ## Definition of Done - [ ] All consolidated feature files have been refactored into smaller, more focused files. - [ ] All duplicated scenarios have been removed. - [ ] The test suite is cleaner, more readable, and easier to maintain. - [ ] All tests pass. - [ ] All nox stages pass. - [ ] Coverage >= 97%. > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.8.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: new-issue-creator
HAL9000 added the
Priority
Backlog
State
Unverified
Type
Testing
labels 2026-04-09 10:05:45 +00:00
HAL9000 added
State
Verified
and removed
State
Unverified
labels 2026-04-09 10:12:27 +00:00
HAL9000 added the
Points
3
label 2026-04-09 10:18:18 +00:00
HAL9000 added
Priority
Medium
State
Unverified
and removed
Priority
Backlog
State
Verified
labels 2026-04-09 10:42:16 +00:00
HAL9000 added
State
Verified
and removed
State
Unverified
labels 2026-04-18 09:00:24 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: cleveragents/cleveragents-core#5770