Files
ss-tools/.agents/command/test.all.md
2026-08-02 22:21:07 +07:00

3.1 KiB

description, handoffs, tools
description handoffs tools
Run full test suite: backend unit tests, frontend vitest, coverage reports. Use as final verification gate.
label agent prompt condition
Fix Test Failures fullstack-coder Fix the following test failures from the full test suite run. Review the error output and implement fixes. Tests failed
label agent prompt condition
Coverage Deep Dive qa-tester Review the coverage report. Identify uncovered critical paths and propose additional tests. Coverage thresholds not met
bash, grep, read

User Input

$ARGUMENTS

Goal

Run the COMPLETE test suite across both backend and frontend, producing a unified pass/fail + coverage report. This is the final verification gate before code review or merge.

Required Skills

MANDATORY USE skill({name="semantics-testing"}) — test conventions, anti-tautology rules, tier markers. MANDATORY USE skill({name="molecular-cot-logging"}) — structured logging during execution.

Execution Steps

1. Pre-flight checks

# Verify venv exists
ls backend/.venv/bin/activate || echo "MISSING VENV"

# Verify node_modules exists
ls frontend/node_modules/.package-lock.json || echo "MISSING NODE_MODULES"

If either is missing, report the issue and STOP — do not attempt to install.

2. Run backend unit tests (Tier 1 — fast)

make test-unit

Expected: <120s. If tests fail, collect the failure output and handoff to Fix Test Failures.

3. Run backend integration tests (Tier 2 — Docker required)

Only if --run-integration is passed in $ARGUMENTS:

make test-integration

Expected: <600s. If Docker is not running or tests time out, report which integration tests passed/failed and continue with partial results.

4. Run frontend vitest tests (Tier 1 — fast)

make test-frontend

If tests fail, collect the failure output.

5. Run E2E tests (optional — requires running app)

Only if --e2e is passed in $ARGUMENTS:

make test-e2e

6. Generate coverage reports

make coverage

Review coverage percentages:

  • Backend: check backend/htmlcov/index.html or term report
  • Frontend: check frontend/coverage/index.html

7. Linting gate

make lint

Output Format

## Full Test Suite Results

### Backend Unit Tests
- Total: N | Passed: N | Failed: N | Skipped: N
- Time: X.Xs
- [PASS/FAIL]

### Backend Integration Tests (if run)
- Total: N | Passed: N | Failed: N | Skipped: N
- Time: X.Xs

### Frontend Tests
- Total: N | Passed: N | Failed: N
- Time: X.Xs

### Coverage
- Backend: XX% (threshold: N/A)
- Frontend: XX% (threshold: 98% stmts, 95% funcs, 80% branches)

### Linting
- Backend (ruff): [PASS/FAIL]
- Frontend (eslint): [PASS/FAIL]

### Overall: [ALL_PASS / FAILURES_DETECTED]

Constraints

  • NEVER run pip install or npm install — report missing deps and stop.
  • If a test tier times out, report partial results rather than nothing.
  • For integration tests: if Docker is not available, skip gracefully and note "Docker not available".
  • Respect the anti-loop protocol: at attempt 3, re-check environment; at attempt 4, escalate.