[BUG] nox -s behave session does not exist — noxfile only exposes unit_tests for BDD/Behave tests #9350

Open
opened 2026-04-14 15:20:59 +00:00 by HAL9000 · 0 comments
Owner

Metadata

  • Commit Message: fix(nox): add behave session alias to noxfile for direct BDD feature file invocation
  • Branch: fix/nox-add-behave-session-alias

Background and Context

During UAT testing of the A2A Facade local mode operations, the specified test command nox -s behave -- features/a2a_facade_wiring.feature features/a2a_facade_coverage.feature features/event_bus.feature fails immediately because no behave nox session exists in noxfile.py.

The noxfile defines unit_tests as the BDD/Behave session (per CONTRIBUTING.md §Testing Tools: "Unit tests only: nox -s unit_tests"), but does not expose a behave session alias. This creates a discoverability and usability gap: contributors and UAT agents who attempt to run specific feature files using the intuitive nox -s behave command receive an error rather than running the tests.

Reproduction:

$ nox -s behave -- features/a2a_facade_wiring.feature
nox > Error while collecting sessions.
nox > Sessions not found: behave

Root cause: noxfile.py has no session named behave. The BDD test session is named unit_tests.

Current Behavior

Running nox -s behave -- <feature_files> fails with:

nox > Error while collecting sessions.
nox > Sessions not found: behave

The correct command is nox -s unit_tests -- <feature_files>, but this is not intuitive and is not documented as an alias.

Expected Behavior

Either:

  1. A behave nox session alias exists that delegates to the same underlying behave-parallel runner as unit_tests, allowing nox -s behave -- features/foo.feature to work; OR
  2. The CONTRIBUTING.md and UAT test specifications are updated to use nox -s unit_tests consistently.

The preferred fix is option (1): add a behave session alias in noxfile.py that accepts the same posargs as unit_tests and runs the same behave-parallel command, so that nox -s behave -- features/foo.feature works as expected.

Acceptance Criteria

  • nox -s behave -- features/a2a_facade_wiring.feature runs without error and executes the specified feature file
  • nox -s behave -- features/a2a_facade_coverage.feature features/event_bus.feature runs without error
  • The behave session reuses the same virtual environment and dependencies as unit_tests
  • CONTRIBUTING.md is updated to document nox -s behave as the command for running specific feature files

Supporting Information

  • Affected file: noxfile.py (no behave session defined)
  • CONTRIBUTING.md line 1232: documents nox -s unit_tests for unit tests, but no behave alias
  • Discovered during UAT testing of A2A Facade local mode operations (features: a2a_facade_wiring.feature, a2a_facade_coverage.feature, event_bus.feature)
  • All A2A facade and event bus feature scenarios pass when run via nox -s unit_tests or directly via python -m behave

Subtasks

  • Add behave nox session to noxfile.py that delegates to behave-parallel with the same setup as unit_tests
  • Ensure behave session reuses the unit_tests venv (or creates its own with identical deps)
  • Update CONTRIBUTING.md §Testing Tools to document nox -s behave -- <feature_file> for targeted feature file execution
  • Tests (Behave): Verify nox -s behave -- features/a2a_facade_wiring.feature runs successfully
  • Run nox (all default sessions), 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.
  • 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: UAT Test Pool | Agent: uat-test-pool-supervisor

## Metadata - **Commit Message**: `fix(nox): add behave session alias to noxfile for direct BDD feature file invocation` - **Branch**: `fix/nox-add-behave-session-alias` ## Background and Context During UAT testing of the A2A Facade local mode operations, the specified test command `nox -s behave -- features/a2a_facade_wiring.feature features/a2a_facade_coverage.feature features/event_bus.feature` fails immediately because no `behave` nox session exists in `noxfile.py`. The noxfile defines `unit_tests` as the BDD/Behave session (per CONTRIBUTING.md §Testing Tools: "Unit tests only: `nox -s unit_tests`"), but does not expose a `behave` session alias. This creates a discoverability and usability gap: contributors and UAT agents who attempt to run specific feature files using the intuitive `nox -s behave` command receive an error rather than running the tests. **Reproduction:** ``` $ nox -s behave -- features/a2a_facade_wiring.feature nox > Error while collecting sessions. nox > Sessions not found: behave ``` **Root cause:** `noxfile.py` has no session named `behave`. The BDD test session is named `unit_tests`. ## Current Behavior Running `nox -s behave -- <feature_files>` fails with: ``` nox > Error while collecting sessions. nox > Sessions not found: behave ``` The correct command is `nox -s unit_tests -- <feature_files>`, but this is not intuitive and is not documented as an alias. ## Expected Behavior Either: 1. A `behave` nox session alias exists that delegates to the same underlying `behave-parallel` runner as `unit_tests`, allowing `nox -s behave -- features/foo.feature` to work; OR 2. The CONTRIBUTING.md and UAT test specifications are updated to use `nox -s unit_tests` consistently. The preferred fix is option (1): add a `behave` session alias in `noxfile.py` that accepts the same `posargs` as `unit_tests` and runs the same `behave-parallel` command, so that `nox -s behave -- features/foo.feature` works as expected. ## Acceptance Criteria - [ ] `nox -s behave -- features/a2a_facade_wiring.feature` runs without error and executes the specified feature file - [ ] `nox -s behave -- features/a2a_facade_coverage.feature features/event_bus.feature` runs without error - [ ] The `behave` session reuses the same virtual environment and dependencies as `unit_tests` - [ ] CONTRIBUTING.md is updated to document `nox -s behave` as the command for running specific feature files ## Supporting Information - Affected file: `noxfile.py` (no `behave` session defined) - CONTRIBUTING.md line 1232: documents `nox -s unit_tests` for unit tests, but no `behave` alias - Discovered during UAT testing of A2A Facade local mode operations (features: `a2a_facade_wiring.feature`, `a2a_facade_coverage.feature`, `event_bus.feature`) - All A2A facade and event bus feature scenarios pass when run via `nox -s unit_tests` or directly via `python -m behave` ## Subtasks - [ ] Add `behave` nox session to `noxfile.py` that delegates to `behave-parallel` with the same setup as `unit_tests` - [ ] Ensure `behave` session reuses the `unit_tests` venv (or creates its own with identical deps) - [ ] Update CONTRIBUTING.md §Testing Tools to document `nox -s behave -- <feature_file>` for targeted feature file execution - [ ] Tests (Behave): Verify `nox -s behave -- features/a2a_facade_wiring.feature` runs successfully - [ ] Run `nox` (all default sessions), 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. - 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: UAT Test Pool | Agent: uat-test-pool-supervisor
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.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#9350
No description provided.