Skip to content

Commit 6ed143f

Browse files
refactor: update testing execution model and dependencies
1 parent b3ccc6a commit 6ed143f

5 files changed

Lines changed: 10 additions & 11 deletions

File tree

.cursor/rules/testing-bdd.mdc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,11 @@ Sync operations work fine inside `async def` steps, so steps with mixed sync/asy
6969

7070
The only place `asyncio.run()` is acceptable is in **non-step** callbacks (e.g. `scenario_context.py` cleanup methods) that may be called from outside an event loop.
7171

72-
## Parallel Execution
72+
## Test Execution Model
7373

74-
Behave is configured to run with **8 parallel workers** (multiprocessing). Steps must not share mutable global state across scenarios.
74+
`make behave` uses stock Behave, which runs **sequentially** (one scenario at a time).
75+
76+
Steps must not share mutable global state across scenarios — use `get_current_scenario_context(context)` and `ScenarioContext` for per-scenario isolation.
7577

7678
## Linting Exclusions
7779

AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ Import direction (one-way): `configs ← models ← helpers ← adapters`
3939
## Testing
4040

4141
- BDD steps use native `async def` (no `asyncio.run()` wrapper)
42-
- Parallel execution: 8 workers (multiprocessing)
43-
- Steps must not share mutable global state
42+
- Sequential execution (`make behave` runs one scenario at a time)
43+
- Steps must not share mutable global state across scenarios
4444

4545
## Dev Setup
4646

docs/getting-started/project_structure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ BDD acceptance tests live at the **project root** in a `features/` directory, fo
151151
| `features/scenario_context_pool_manager.py` | Singleton pool mapping scenario ID → `ScenarioContext` |
152152
| `features/environment.py` | `behave` hooks — container setup and teardown |
153153

154-
`ScenarioContext` prevents cross-contamination between parallel scenarios by giving each one its own isolated storage.
154+
`ScenarioContext` prevents cross-contamination between scenarios by giving each one its own isolated storage.
155155
`ScenarioContextPoolManager` (a `Singleton`) creates or retrieves the context for a given scenario ID and disposes of it
156156
after the scenario completes.
157157

pyproject.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -411,9 +411,6 @@ exclude_dirs = ["features", "docs", "scripts"]
411411
skips = ["B101", "B301", "B403"]
412412

413413
[tool.behave]
414-
# Parallel execution settings
415-
parallel = 8
416-
parallel_scheme = "multiprocessing"
417414

418415
# Output formatting
419416
show_snippets = false

uv.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)