Quickstart: Orchestrator End-to-End Testing

Prerequisites

Required

  • Python 3.11+
  • Git
  • At least 2 core agents installed and authenticated

Core Agents (at least 2 required)

AgentInstallAuth Check
Claude Codenpm install -g @anthropic-ai/claude-codeclaude --version
GitHub Codexnpm install -g @openai/codexcodex auth status
GitHub CopilotVia GitHub CLI or VS Codegh copilot --version
Google Geminipip install google-generativeaigemini auth status
OpenCodenpm install -g opencodeopencode --version

Extended Agents (optional)

Cursor, Qwen, Augment, Kilocode, Roo, Windsurf, Amazon Q

Running Tests

Check Agent Availability

# See which agents are available
pytest tests/specify_cli/orchestrator/ -m orchestrator_availability -v

Run All E2E Tests

# Full suite (may take up to 30 minutes)
pytest tests/specify_cli/orchestrator/ -m "orchestrator" -v

Run Specific Categories

# Happy path only
pytest tests/specify_cli/orchestrator/ -m orchestrator_happy_path -v

# Review cycles
pytest tests/specify_cli/orchestrator/ -m orchestrator_review_cycles -v

# Parallel execution
pytest tests/specify_cli/orchestrator/ -m orchestrator_parallel -v

# Extended agent smoke tests
pytest tests/specify_cli/orchestrator/ -m orchestrator_smoke -v

Run with Specific Test Path

# Force 1-agent path (even if more available)
pytest tests/specify_cli/orchestrator/ --test-path=1-agent -v

# Force 2-agent path
pytest tests/specify_cli/orchestrator/ --test-path=2-agent -v

Test Path Behavior

The test suite automatically selects a path based on available agents:

Available AgentsPathWhat's Tested
11-agentSame agent does impl + review
22-agentDifferent agents for impl vs review
3+3+-agentFull suite including implicit fallback coverage

Fixture Management

List Available Checkpoints

ls tests/fixtures/orchestrator/

Create a New Checkpoint

from specify_cli.orchestrator.testing import create_checkpoint

# After reaching desired state in a test
create_checkpoint(
    name="my_checkpoint",
    state=orchestration_state,
    feature_dir=feature_dir,
    worktrees=worktree_list,
)

Detect Stale Checkpoints

# Check if fixtures match current orchestrator version
pytest tests/specify_cli/orchestrator/ -m orchestrator_fixtures --check-stale

Troubleshooting

"No core agents available"

At least 2 core agents must be installed and authenticated. Check:

# Verify installations
which claude codex opencode gemini

# Verify auth (varies by agent)
claude --version
codex auth status

"Test skipped: extended agent not available"

This is expected behavior. Extended agents skip gracefully when not installed.

"Fixture stale: orchestrator version mismatch"

Regenerate fixtures after updating orchestrator code:

pytest tests/specify_cli/orchestrator/ -m orchestrator_fixtures --regenerate

Tests timing out

E2E tests with real agents can take several minutes. Increase timeout:

pytest tests/specify_cli/orchestrator/ -v --timeout=600

Environment Variables

VariableDefaultDescription
ORCHESTRATOR_TEST_TIMEOUT300Max seconds per test
ORCHESTRATOR_PROBE_TIMEOUT10Max seconds for auth probe
ORCHESTRATOR_SKIP_SLOWfalseSkip tests >60s if true

CI Considerations

These tests are designed for local execution with real agents. For CI:

1. Ensure agents are installed in CI environment 2. Configure agent authentication via secrets 3. Consider running only orchestrator_availability in CI 4. Full suite best run manually before releases