name: 'step-03-generate-tests' description: 'Orchestrate parallel test generation via subprocesses'
Launch parallel subprocesses to generate API and E2E tests simultaneously for maximum performance.
{communication_language}CRITICAL: Follow this sequence exactly. Do not skip, reorder, or improvise.
Generate unique timestamp for temp file naming:
const timestamp = new Date().toISOString().replace(/[:.]/g, '-');
Prepare input context for both subprocesses:
const subprocessContext = {
features: /* from Step 2 coverage plan */,
knowledge_fragments_loaded: /* list of fragments */,
config: {
test_framework: config.test_framework,
use_playwright_utils: config.tea_use_playwright_utils,
browser_automation: config.tea_browser_automation // "auto" | "cli" | "mcp" | "none"
},
timestamp: timestamp
};
Launch subprocess in parallel:
./step-03a-subprocess-api.md/tmp/tea-automate-api-tests-${timestamp}.jsonsubprocessContextSystem Action:
🚀 Launching Subprocess A: API Test Generation
📝 Output: /tmp/tea-automate-api-tests-${timestamp}.json
⏳ Status: Running in parallel...
Launch subprocess in parallel:
./step-03b-subprocess-e2e.md/tmp/tea-automate-e2e-tests-${timestamp}.jsonsubprocessContextSystem Action:
🚀 Launching Subprocess B: E2E Test Generation
📝 Output: /tmp/tea-automate-e2e-tests-${timestamp}.json
⏳ Status: Running in parallel...
Monitor subprocess execution:
⏳ Waiting for subprocesses to complete...
├── Subprocess A (API): Running... ⟳
└── Subprocess B (E2E): Running... ⟳
[... time passes ...]
├── Subprocess A (API): Complete ✅
└── Subprocess B (E2E): Complete ✅
✅ All subprocesses completed successfully!
Verify both outputs exist:
const apiOutputExists = fs.existsSync(`/tmp/tea-automate-api-tests-${timestamp}.json`);
const e2eOutputExists = fs.existsSync(`/tmp/tea-automate-e2e-tests-${timestamp}.json`);
if (!apiOutputExists || !e2eOutputExists) {
throw new Error('One or both subprocess outputs missing!');
}
Display performance metrics:
🚀 Performance Report:
- Execution Mode: PARALLEL (2 subprocesses)
- API Test Generation: ~X minutes
- E2E Test Generation: ~Y minutes
- Total Elapsed: ~max(X, Y) minutes
- Sequential Would Take: ~(X + Y) minutes
- Performance Gain: ~50% faster!
Load aggregation step:
Load next step: {nextStepFile}
The aggregation step (3C) will:
Proceed to Step 3C (Aggregation) when:
Do NOT proceed if:
Master Rule: Parallel subprocess execution is MANDATORY for performance.