test(cli): expand lifecycle command coverage #241

Closed
opened 2026-02-22 23:40:27 +00:00 by freemo · 0 comments
Owner

Metadata

  • Commit: test(cli): expand lifecycle command coverage
  • Branch: feature/m1-cli-tests

Subtasks

  • Tests (Behave): Add CLI coverage for action create/list/show/archive and plan use/list/status/execute/apply/cancel (success + error paths).
  • Tests (Behave): Add scenarios for plan use with multi-project args, automation profile overrides, invariants, and actor overrides.
  • Tests (Behave): Add scenarios that assert Action phase visibility and Apply terminal outcomes (applied, constrained, errored, cancelled) in plan status output.
  • Tests (Behave): Add negative cases for missing config, invalid args, invalid project names, and unknown actions/resources.
  • Tests (Robot): Add end-to-end Robot suite for action → plan → execute → apply on a local repo (sandbox + ChangeSet capture verified).
  • Update docs/development/testing.md with CLI suites + fixtures.
  • Tests (ASV): Add benchmarks/plan_cli_smoke_bench.py for CLI argument parsing overhead.
  • Run nox (all default sessions, including benchmark), fix any errors if needed ensuring nox passes.
  • Tests (Robot): Add end-to-end Robot suite for action → plan → execute → apply on a local repo with git_worktree sandbox + ChangeSet capture verification.
  • Tests (Robot): Add negative Robot cases for invalid project names, missing resources, and invalid --arg values to match CLI error outputs.
  • Tests (Behave): Add one CLI scenario mirroring the Robot E2E flow to keep unit/integration expectations aligned.
  • Update docs/development/testing.md with Robot CLI suite entry and fixtures.
  • Tests (ASV): Add benchmarks/cli_robot_flow_bench.py for CLI flow fixture setup overhead.
  • Verify coverage >=97% via nox -s coverage_report. If coverage is <97% then review the current unit test coverage report at build/coverage.xml and use it to write new Behave based unit tests to improve code coverage. Specifically, write Behave style unit tests that are descriptively named and specifically improves coverage on whichever file has the most uncovered lines by writing tests that will target the uncovered lines in the report. Once that is done rerun nox -s coverage_report to verify all tests pass and coverage is above >=97%. Only mark this as complete once coverage is >=97%, if not repeat this task as many times as is needed until coverage reaches >=97%.
  • Run nox (all default sessions, including benchmark), fix any errors if needed ensuring nox passes across entire code base, do not ignore any failure even if it seems unrelated to this commit, fix it.

Section: #### Section 3 Notes
Status: Completed

## Metadata - **Commit**: `test(cli): expand lifecycle command coverage` - **Branch**: `feature/m1-cli-tests` ## Subtasks - [x] Tests (Behave): Add CLI coverage for action create/list/show/archive and plan use/list/status/execute/apply/cancel (success + error paths). - [x] Tests (Behave): Add scenarios for plan use with multi-project args, automation profile overrides, invariants, and actor overrides. - [x] Tests (Behave): Add scenarios that assert Action phase visibility and Apply terminal outcomes (`applied`, `constrained`, `errored`, `cancelled`) in `plan status` output. - [x] Tests (Behave): Add negative cases for missing config, invalid args, invalid project names, and unknown actions/resources. - [x] Tests (Robot): Add end-to-end Robot suite for action → plan → execute → apply on a local repo (sandbox + ChangeSet capture verified). - [x] Update `docs/development/testing.md` with CLI suites + fixtures. - [x] Tests (ASV): Add `benchmarks/plan_cli_smoke_bench.py` for CLI argument parsing overhead. - [x] Run `nox` (all default sessions, including benchmark), fix any errors if needed ensuring nox passes. - [x] Tests (Robot): Add end-to-end Robot suite for action → plan → execute → apply on a local repo with git_worktree sandbox + ChangeSet capture verification. - [x] Tests (Robot): Add negative Robot cases for invalid project names, missing resources, and invalid `--arg` values to match CLI error outputs. - [x] Tests (Behave): Add one CLI scenario mirroring the Robot E2E flow to keep unit/integration expectations aligned. - [x] Update `docs/development/testing.md` with Robot CLI suite entry and fixtures. - [x] Tests (ASV): Add `benchmarks/cli_robot_flow_bench.py` for CLI flow fixture setup overhead. - [x] Verify coverage >=97% via `nox -s coverage_report`. If coverage is <97% then review the current unit test coverage report at `build/coverage.xml` and use it to write new Behave based unit tests to improve code coverage. Specifically, write Behave style unit tests that are descriptively named and specifically improves coverage on whichever file has the most uncovered lines by writing tests that will target the uncovered lines in the report. Once that is done rerun `nox -s coverage_report` to verify all tests pass and coverage is above >=97%. Only mark this as complete once coverage is >=97%, if not repeat this task as many times as is needed until coverage reaches >=97%. - [x] Run `nox` (all default sessions, including benchmark), fix any errors if needed ensuring nox passes across **entire** code base, do not ignore any failure even if it seems unrelated to this commit, fix it. **Section**: #### Section 3 Notes **Status**: Completed
freemo added this to the v3.0.0 milestone 2026-02-22 23:40:27 +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.

Blocks
Reference
cleveragents/cleveragents-core#241
No description provided.