How to Generate Tests from a PRD¶
Convert a PDF Product Requirements Document into test specifications and production-ready Playwright tests automatically.
Prerequisites¶
- Quorvex AI installed and running (
make devormake prod-dev) - A PDF PRD document describing product features
- AI credentials configured in
.env - Optional: a live target URL for the application described in the PRD
Step 1: Prepare the PRD Document¶
The system accepts PDF files containing product requirements. For best results, your PRD should include:
- Feature descriptions with acceptance criteria
- User stories or use cases
- Screen flows or navigation descriptions
- A target URL (if the application already exists)
Tip
The AI extracts features from the PRD automatically. Clearly named sections and numbered requirements produce better test specs.
Step 2: Process the PRD via CLI¶
# Process entire PRD -- generates tests for all discovered features
python orchestrator/cli.py requirements.pdf --prd
# Process a specific feature only
python orchestrator/cli.py requirements.pdf --prd --feature "User Login"
The PRD pipeline:
- PDF Extraction -- parses the PDF, identifies features, and stores content chunks in the vector store (ChromaDB) for RAG retrieval
- Spec Generation -- for each feature, the Planner retrieves relevant PRD context and generates a test spec
- Test Generation -- each spec runs through the native generator (with live browser exploration if a URL is present)
- Healing -- if tests fail, the native healer fixes them (up to 3 attempts)
Step 3: Process the PRD via Dashboard¶
- Navigate to PRD in the dashboard (
/prd) - Click Upload PRD
- Select your PDF file
- The system parses the document and displays extracted features
- Select which features to generate tests for (or select all)
- Click Generate Tests
- Monitor progress on the Runs page
Step 4: Review Generated Specs¶
PRD processing generates multi-test spec files in specs/. Each file may contain multiple test cases (TC-001, TC-002, etc.).
View the generated specs:
Or browse them in the Specs page of the dashboard.
Step 5: Split Multi-Test Specs (Optional)¶
If a generated spec contains multiple test cases and you want individual files:
This creates separate files for each test case in the spec.
Step 6: Run Generated Tests¶
Run all generated tests:
Or run a specific generated test:
Step 7: Iterate on Failed Tests¶
If some tests fail after generation:
- Review the failure output in the run artifacts (
runs/<timestamp>/) - Edit the spec to clarify ambiguous steps
- Re-run with hybrid healing for more healing attempts:
Warning
PRD-generated specs may need manual refinement if the PRD description is vague or the target application differs from the PRD. Review and edit specs before relying on them for regression testing.
Verification¶
Confirm the PRD pipeline completed:
- Generated specs exist in
specs/with feature-related names - Generated test files exist in
tests/generated/ - Run artifacts in
runs/<timestamp>/showstatus: passed - Running the tests directly passes:
Related Guides¶
- Writing Specs -- refine generated specs manually
- Pipeline Modes -- understand the native pipeline
- Regression Batches -- batch-run PRD-generated tests
- Exploration and Requirements -- alternative discovery approach