- Updated scripts/tests/run-e2e.sh to generate comprehensive reports - Added JSON reports for AI parsing with actionable recommendations - Added markdown reports for human readability - Created summary JSON with for_ai_agents section for automated action - Added timestamped reports with symlinks to latest - Added health check status to reports - Created scripts/tests/reports/README.md with usage documentation - Reports include: test results, failure analysis, next actions, file paths |
||
|---|---|---|
| .. | ||
| README.md | ||
E2E Test Reports
This directory contains detailed E2E test reports generated by the test runner script.
Report Files
Each test run generates the following files:
Timestamped Reports
test-report-{timestamp}.json- Full JSON report with test results, metadata, and actionable itemstest-report-{timestamp}.md- Markdown report for human readabilitysummary-{timestamp}.json- AI-friendly summary with quick actionsresults-{timestamp}.json- Raw Playwright JSON outputtest-output-{timestamp}.log- Complete test output log
Latest Reports (Symlinks)
latest.json- Symlink to most recent JSON reportlatest.md- Symlink to most recent markdown reportlatest-summary.json- Symlink to most recent AI summary
For AI Agents
The JSON reports are designed to be easily parsed by coding agents for automated action:
Quick Summary
cat scripts/tests/reports/latest-summary.json
Key fields for AI agents:
for_ai_agents.quick_summary- One-line status summaryfor_ai_agents.if_failed_check- Path to detailed log for failure analysisfor_ai_agents.html_report- Path to HTML report for visual inspectionfor_ai_agents.next_action- Recommended next action
Example JSON Structure
{
"timestamp": "20260509_133000",
"test_status": "passed",
"tests_total": 50,
"tests_passed": 48,
"tests_failed": 2,
"duration_seconds": 120,
"health_check": {
"status": "healthy",
"app_running": true,
"app_url": "http://localhost:3050"
},
"for_ai_agents": {
"quick_summary": "failed - 48/50 tests passed in 120s",
"if_failed_check": "scripts/tests/reports/test-output-20260509_133000.log",
"html_report": "web/playwright-report/index.html",
"next_action": "Review failures in log and fix broken selectors or API issues"
}
}
Running Tests
Execute the test runner script:
./scripts/tests/run-e2e.sh
This will:
- Install dependencies if needed
- Install Playwright browsers if needed
- Run all E2E tests
- Generate reports in this directory
- Check application health
- Create symlinks to latest reports
Report Locations
- Reports Directory:
scripts/tests/reports/ - HTML Report:
web/playwright-report/index.html - Playwright Results:
web/test-results/
Using Reports for Debugging
For Humans
# View latest markdown report
cat scripts/tests/reports/latest.md
# Open HTML report
open web/playwright-report/index.html
# View test output log
cat scripts/tests/reports/latest-summary.json | jq .for_ai_agents.if_failed_check | xargs cat
For AI Agents
# Get quick status
cat scripts/tests/reports/latest-summary.json | jq .for_ai_agents.quick_summary
# Get next action
cat scripts/tests/reports/latest-summary.json | jq .for_ai_agents.next_action
# Get failure log path
cat scripts/tests/reports/latest-summary.json | jq -r .for_ai_agents.if_failed_check
Report Retention
Reports are timestamped and retained indefinitely. To clean up old reports:
# Remove reports older than 30 days
find scripts/tests/reports -name "*.json" -mtime +30 -delete
find scripts/tests/reports -name "*.md" -mtime +30 -delete
find scripts/tests/reports -name "*.log" -mtime +30 -delete
Integration with CI
The test runner can be integrated into CI pipelines:
- name: Run E2E Tests
run: ./scripts/tests/run-e2e.sh
- name: Upload Reports
uses: actions/upload-artifact@v3
with:
name: e2e-test-reports
path: scripts/tests/reports/
AI agents can then parse the latest-summary.json to determine next actions automatically.