You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: add single e2e test isolation guide with trace integration
- Add 'Running a single e2e test in isolation' subsection documenting
required E2E_PROFILE/USE_REAL_CLI env vars and --config flag when
bypassing pnpm scripts
- Show -t flag usage for filtering by test name
- Include BEAMCODE_TRACE patterns (smart + full) combined with vitest
file/name filters for targeted debugging
- Fix stale session-manager-* references → session-coordinator-* in
debugging walkthrough steps 1 and 3, and key files table
Copy file name to clipboardExpand all lines: DEVELOPMENT.md
+50-4Lines changed: 50 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -740,6 +740,49 @@ Tests are auto-skipped when prerequisites are not met. Detection logic is in `sr
740
740
- PR: `E2E Real CLI Smoke` runs when `ANTHROPIC_API_KEY` secret is configured
741
741
- Nightly: full deterministic + full real CLI (secret-gated)
742
742
743
+
### Running a single e2e test in isolation
744
+
745
+
**This is the primary workflow when debugging a failing real backend test.**
746
+
747
+
The real backend scripts set required env vars (`E2E_PROFILE`, `USE_REAL_CLI`) and point vitest at the real config. To run a single test you must preserve those vars:
748
+
749
+
```bash
750
+
# Run one test file (e.g. claude) — smoke lane
751
+
E2E_PROFILE=real-smoke USE_REAL_CLI=true \
752
+
pnpm vitest run src/e2e/real/session-coordinator-claude.e2e.test.ts \
753
+
--config vitest.e2e.real.config.ts
754
+
755
+
# Filter further by test name using -t
756
+
E2E_PROFILE=real-smoke USE_REAL_CLI=true \
757
+
pnpm vitest run src/e2e/real/session-coordinator-claude.e2e.test.ts \
758
+
--config vitest.e2e.real.config.ts \
759
+
-t "launch emits process spawn"
760
+
```
761
+
762
+
**With message tracing** (recommended when the trace dump alone is not enough):
Replace `session-coordinator-claude` with `session-coordinator-gemini`, `session-coordinator-codex`, or `session-coordinator-opencode` for other backends. Use `real-full` profile to enable full-coverage tests (`it.runIf(runFull)`).
783
+
784
+
> **Note:** The `-t` flag matches a substring of the test name. Wrap in quotes if the name contains spaces.
785
+
743
786
### Architecture Boundary Checks
744
787
745
788
Run architecture checks locally with:
@@ -803,8 +846,9 @@ Trace levels:
803
846
1.**Run the failing test in isolation** with verbose output:
804
847
805
848
```bash
806
-
pnpm vitest run src/e2e/real/session-manager-gemini.e2e.test.ts \
807
-
--reporter=verbose 2>&1| tee test-output.log
849
+
E2E_PROFILE=real-smoke USE_REAL_CLI=true \
850
+
pnpm vitest run src/e2e/real/session-coordinator-gemini.e2e.test.ts \
851
+
--config vitest.e2e.real.config.ts --reporter=verbose 2>&1| tee test-output.log
808
852
```
809
853
810
854
Look for the `[gemini-e2e-debug]` (or `[claude-e2e-debug]`, etc.) prefix in the output — that's the trace dump.
@@ -824,7 +868,9 @@ Trace levels:
824
868
825
869
```bash
826
870
BEAMCODE_TRACE=1 BEAMCODE_TRACE_LEVEL=smart \
827
-
pnpm vitest run src/e2e/real/session-manager-gemini.e2e.test.ts 2>trace.ndjson
871
+
E2E_PROFILE=real-smoke USE_REAL_CLI=true \
872
+
pnpm vitest run src/e2e/real/session-coordinator-gemini.e2e.test.ts \
0 commit comments