TEST-INFRA: [test-data-quality] Use Scenario Outline in cli_internals.feature #2530

Open
opened 2026-04-03 18:48:52 +00:00 by freemo · 0 comments
Owner

Metadata

  • Branch: test/cli-internals-scenario-outline-exit-codes
  • Commit Message: test(cli_internals): replace repetitive exit code scenarios with Scenario Outline
  • Milestone: v3.8.0
  • Parent Epic: #1678

Description

The scenarios in features/cli_internals.feature that test exit code conversion are repetitive and contain hardcoded data. Each exit code case is written as a separate, near-identical scenario, making the suite harder to maintain and extend.

Recommendation:

Use a Scenario Outline to make these tests more data-driven. This will reduce duplication and make it easier to add new test cases in the future.

Example:

Scenario Outline: Convert exit codes
  When I convert exit code <input>
  Then the result should be <output>

  Examples:
    | input | output |
    | 0     | 0      |
    | 1     | 1      |
    | -1    | -1     |
    | None  | 0      |

Subtasks

  • Audit all repetitive exit-code scenarios in features/cli_internals.feature
  • Replace the repetitive scenarios with a single Scenario Outline using an Examples table
  • Update or add corresponding step definitions in features/steps/ to support the parameterised steps
  • Verify all rewritten scenarios pass with nox -e unit_tests
  • Verify coverage remains >= 97% with nox -e coverage_report
  • Run nox (all default sessions) and fix any errors

Definition of Done

  • All repetitive exit-code scenarios in features/cli_internals.feature are replaced by a single Scenario Outline with an Examples table
  • No duplicate scenario bodies remain for exit code conversion cases
  • All step definitions are updated to support the new parameterised steps
  • All nox stages pass
  • Coverage >= 97%

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

## Metadata - **Branch**: `test/cli-internals-scenario-outline-exit-codes` - **Commit Message**: `test(cli_internals): replace repetitive exit code scenarios with Scenario Outline` - **Milestone**: v3.8.0 - **Parent Epic**: #1678 ## Description The scenarios in `features/cli_internals.feature` that test exit code conversion are repetitive and contain hardcoded data. Each exit code case is written as a separate, near-identical scenario, making the suite harder to maintain and extend. **Recommendation:** Use a Scenario Outline to make these tests more data-driven. This will reduce duplication and make it easier to add new test cases in the future. **Example:** ```gherkin Scenario Outline: Convert exit codes When I convert exit code <input> Then the result should be <output> Examples: | input | output | | 0 | 0 | | 1 | 1 | | -1 | -1 | | None | 0 | ``` ## Subtasks - [ ] Audit all repetitive exit-code scenarios in `features/cli_internals.feature` - [ ] Replace the repetitive scenarios with a single `Scenario Outline` using an `Examples` table - [ ] Update or add corresponding step definitions in `features/steps/` to support the parameterised steps - [ ] Verify all rewritten scenarios pass with `nox -e unit_tests` - [ ] Verify coverage remains >= 97% with `nox -e coverage_report` - [ ] Run `nox` (all default sessions) and fix any errors ## Definition of Done - [ ] All repetitive exit-code scenarios in `features/cli_internals.feature` are replaced by a single `Scenario Outline` with an `Examples` table - [ ] No duplicate scenario bodies remain for exit code conversion cases - [ ] All step definitions are updated to support the new parameterised steps - [ ] 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-03 18:48:59 +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#2530
No description provided.