Design an Agent-Orchestrated QA Pipeline from Requirements to Test Report
Company: ByteDance
Role: Senior SDE, Quality Platform & AI Test Automation
Category: ML System Design
Difficulty: medium
Interview Round: Technical Screen
## Prompt
Design an AI-assisted QA workflow that takes a product requirement document and produces reviewed test cases, test data, automated test scripts, execution results, and a final test report. Model product, development, and QA responsibilities as collaborating agents rather than simply inserting one model call into each CI stage. Address accuracy, adoption, static analysis, orchestration, and environments without local GPU capacity.
### Constraints & Assumptions
- Every generated artifact must retain provenance to requirement sections and prior artifacts.
- High-risk or low-confidence changes require human approval before execution or merge.
- Generated scripts run in an isolated test environment with least privilege.
- CI workers may call a remote inference service but do not have GPUs themselves.
### Clarifying Questions to Ask
- Which product surfaces, test frameworks, and risk classes are in the first release?
- How are correctness and adoption measured for cases, data, scripts, and reports separately?
- What information may be sent to remote inference, and what must stay inside the security boundary?
```hint Treat artifacts as state
Pass versioned requirement slices, cases, data specifications, scripts, and execution evidence between agents instead of relying on an unstructured conversation.
```
```hint Measure acceptance and correctness separately
A frequently accepted test case can still be wrong, while a correct case can be rejected because it is redundant or hard to maintain.
```
### What a Strong Answer Covers
- Typed artifacts and an orchestrator that coordinates specialized agents through explicit contracts.
- Requirement coverage, confidence, critique, static-analysis, and human-review gates.
- Test-data generation with privacy, determinism, and reproducibility controls.
- Sandboxed script execution, result interpretation, retry limits, and failure isolation.
- Remote-model serving, caching, batching, auditability, evaluation, and safe rollout.
### Follow-up Questions
1. How would the workflow respond when generated tests reveal that the requirement itself is ambiguous?
2. How would you prevent one agent's hallucinated API from propagating through every later stage?
3. What would you cache, and which changes must invalidate that cache?
Overview: Design an agent-orchestrated QA pipeline that turns requirements into traceable test cases, data, scripts, execution evidence, and reports through typed artifacts, review gates, and sandboxed automation.
Read the full ByteDance Senior SDE, Quality Platform & AI Test Automation interview experience this question came from