Test/QA — Scaled Testing
Run the project, verify it works, and test it at a depth that matches the stakes.
Trigger
The user has implemented code (typically after the implement and review skills) and wants to verify it works correctly at runtime. A REVIEW_REPORT.md should exist confirming no critical issues block testing. If it doesn't exist, warn the user and recommend running review first, but proceed if they insist.
Workflow
Step 1: Assess Stakes
Ask the user one question:
What are the stakes for this project?
- Low — personal project or prototype (basic smoke tests)
- Medium — users will depend on this (integration + E2E + basic security)
- High — production, paid, or regulated (full suite including performance and security)
This determines the depth of every subsequent step.
Step 2: Load Context
Read the project artifacts:
PROJECT_PLAN.md — requirements, success criteria, non-functional requirements
BUILD_MANIFEST.md — how to run/test, dependencies, env vars, NFR targets
REVIEW_REPORT.md — items marked "Needs Testing", known issues
Verify the project can run:
- Check that dependencies are installed. If not, install them.
- Check that required env vars exist in
.env. Warn about missing ones.
- Attempt to start the project. If it fails to start, stop and report the error.
Step 3: Detect Project Type
Determine if the project has a web UI:
- Check for frontend frameworks in dependencies (
react, vue, svelte, next, nuxt, angular, etc.)
- Check for HTML templates, CSS files, or static assets
- If a web UI is detected, enable visual UI testing in Steps 5, 7, and the dedicated Step 8
This flag controls whether browser automation is used throughout the remaining steps.
Step 4: Smoke Tests (all stakes levels)
Verify the basics work:
- Project starts without errors
- Main entry points respond — homepage loads, API root returns expected response, CLI runs without crashing
- Core happy path — the single most important user flow works end to end (e.g., sign up → log in → perform main action)
For web UI projects: Use browser automation (browser-use subagent) for smoke tests:
- Open the app in a browser
- Take a screenshot of the homepage
- Check the browser console for errors (JS exceptions, failed network requests, 404s)
- Verify the page is not blank and key elements are visible
- If console errors exist at startup, report them immediately
If smoke tests fail, stop here. Report failures (with screenshots for UI projects) and recommend fixing before deeper testing.
Step 5: Integration Tests (medium + high)
Test that components work together correctly:
- API endpoints — call each endpoint from the plan's API Surface table. Verify correct responses, status codes, and error handling for invalid input.
- Database operations — create, read, update, delete operations work. Data persists correctly. Relationships are maintained.
- Authentication flows — login, logout, token refresh, protected routes reject unauthenticated requests.
- Third-party integrations — external APIs connect and respond (or are properly mocked if keys aren't available).
- Shared interface contracts — components consuming shared types behave correctly when given valid and invalid data.
Write test files for any integration tests that don't already exist. Use the test framework specified in the plan.
Step 6: End-to-End Tests (medium + high)
Test complete user workflows:
- Identify the key user journeys from the plan's functional requirements.
- For each journey, simulate the full flow — from entry point to completion.
- Verify the outcome matches the expected behavior.
- Test with realistic data, not just "test123" inputs.
For web UI projects: Use browser automation for all E2E tests:
- Navigate each user journey in the browser (click links, fill forms, submit, verify results)
- Monitor the browser console throughout — capture every warning, error, and failed network request
- Take a screenshot at each major step in the journey
- Take a screenshot immediately on any failure or console error
- Verify visual outcomes (correct page loaded, success messages appear, data displays correctly)
For APIs, chain requests to simulate real usage patterns. For CLI tools, run full command sequences.
Step 7: Edge Cases & Error Handling (medium + high)
Test what happens when things go wrong:
- Empty inputs, null values, missing required fields
- Extremely long strings, special characters, unicode
- Duplicate submissions (e.g., double-clicking a submit button)
- Expired or invalid auth tokens
- Network timeouts (if testable)
- Concurrent requests to the same resource
Step 8: Visual UI Testing (medium + high, web UI projects only)
Skip this step for non-UI projects (APIs, CLIs, libraries).
Console audit:
- Collect all browser console output captured during Steps 4-7
- Categorize: errors (red), warnings (yellow), info
- For each error — note which page/action triggered it
Responsive testing (medium + high):
Test the app at three viewport sizes:
- Mobile: 375x812
- Tablet: 768x1024
- Desktop: 1440x900
At each viewport:
- Navigate to every key page
- Take a screenshot
- Check for layout breakage — overlapping elements, horizontal scroll, cut-off text, unreachable buttons
- Verify navigation is usable (hamburger menu works on mobile, etc.)
Accessibility basics (high only):
- Check for missing alt text on images
- Check for missing form labels
- Check color contrast on key text elements
- Verify the page is navigable with keyboard (tab through interactive elements)
- Check that focus states are visible
Screenshot evidence:
Save all screenshots to a test-screenshots/ directory in the project, named descriptively:
smoke-homepage-desktop.png
e2e-login-flow-step3-error.png
responsive-dashboard-mobile.png
Reference these in the test report.
Step 9: Security Testing (high only)
Check for common vulnerabilities:
- Input validation — attempt SQL injection, XSS, command injection on all user inputs
- Authentication — test for session fixation, token leakage, brute force vulnerability
- Authorization — can a regular user access admin endpoints? Can user A access user B's data?
- Data exposure — do API responses leak sensitive fields (passwords, tokens, internal IDs)?
- Secrets — scan code for hardcoded API keys, passwords, or connection strings
- Dependencies — check for known vulnerabilities in installed packages (npm audit, pip audit, etc.)
- Headers — verify security headers are set (CORS, CSP, HSTS) for web applications
Step 10: Performance Testing (high only)
Verify the plan's performance targets:
- Response times — measure API response times against NFR targets
- Load handling — if the plan specifies concurrent user targets, simulate load and measure degradation
- Database queries — check for N+1 queries, missing indexes, slow queries
- Bundle size — for frontend apps, verify bundle size is reasonable
- Memory — check for obvious memory leaks in long-running processes
Use the non-functional requirements from BUILD_MANIFEST.md as the benchmark. If no specific targets exist, use reasonable defaults and report the numbers.
Step 11: Produce Test Report
Generate TEST_REPORT.md and save to the project root. Then launch the dashboard skill as a non-blocking subagent to regenerate DASHBOARD.html with the test results. Don't wait for it to complete.
# Test Report
> Tested on [date] | Stakes level: [Low/Medium/High]
## Summary
- **Smoke tests:** [pass/fail]
- **Integration tests:** [X/Y pass] (medium+high only)
- **E2E tests:** [X/Y pass] (medium+high only)
- **Visual UI:** [pass/issues found] (medium+high, web UI only)
- **Security:** [issues found / clean] (high only)
- **Performance:** [meets targets / issues] (high only)
- **Overall verdict:** Ready to ship / Needs fixes
## Smoke Tests
| Test | Status | Notes |
|------|--------|-------|
| Project starts | Pass/Fail | [details] |
| Main entry responds | Pass/Fail | [details] |
| Core happy path | Pass/Fail | [details] |
## Integration Tests
| Area | Tests | Passed | Failed | Notes |
|------|-------|--------|--------|-------|
| API endpoints | [N] | [N] | [N] | [details] |
| Database | [N] | [N] | [N] | [details] |
| Auth | [N] | [N] | [N] | [details] |
## E2E Tests
| User Journey | Status | Notes |
|-------------|--------|-------|
| [journey] | Pass/Fail | [details] |
## Edge Cases & Error Handling
| Test | Status | Notes |
|------|--------|-------|
| [edge case] | Pass/Fail | [details] |
## Visual UI (medium+high, web UI only)
### Console Errors
| Page/Action | Error | Severity |
|-------------|-------|----------|
| [page] | [error message] | Error/Warning |
### Responsive Testing
| Page | Mobile | Tablet | Desktop | Issues |
|------|--------|--------|---------|--------|
| [page] | Pass/Fail | Pass/Fail | Pass/Fail | [details] |
### Accessibility (high only)
| Check | Status | Notes |
|-------|--------|-------|
| Alt text | Pass/Fail | [details] |
| Form labels | Pass/Fail | [details] |
| Color contrast | Pass/Fail | [details] |
| Keyboard navigation | Pass/Fail | [details] |
### Screenshots
All screenshots saved to `test-screenshots/`. See [filename] for [description].
## Security (high only)
| Check | Status | Severity | Notes |
|-------|--------|----------|-------|
| SQL injection | Pass/Fail | Critical/Warning | [details] |
| XSS | Pass/Fail | Critical/Warning | [details] |
| Auth bypass | Pass/Fail | Critical/Warning | [details] |
## Performance (high only)
| Metric | Target | Actual | Status |
|--------|--------|--------|--------|
| [metric] | [target] | [measured] | Pass/Fail |
## Non-Functional Requirements Status
| ID | Requirement | Target | Result | Status |
|----|-------------|--------|--------|--------|
| NFR-01 | [requirement] | [target] | [actual] | Met / Not Met |
## Failed Tests — Details
[For each failed test, provide: what failed, expected vs. actual, reproduction steps, suggested fix]
## Recommended Actions
1. [Most critical fix]
2. [Second fix]
3. [etc.]
## Next Step
[If all critical tests pass:] Ready for ship.
[If failures exist:] Fix the items above, then re-run test-qa.
Step 12: Present Findings
Walk the user through the results:
- Overall verdict — pass or needs work
- Any critical failures with details
- Security concerns (if high stakes)
- Performance numbers vs. targets (if high stakes)
- Recommended next steps — fix and re-test, or proceed to ship
Interaction Guidelines
- Run the code, don't just read it. The review skill checks code by reading. This skill checks by executing.
- Be honest about limitations. If you can't fully test something (e.g., no API keys for a third-party service), say so. Don't report a pass you can't verify.
- Scale to stakes. Low-stakes projects get quick smoke tests, not a full security audit. Respect the user's time.
- Write lasting tests. Integration and E2E tests written during this phase should be saved to the test directory so they can be re-run later, not thrown away.
- Don't fix, just report. Like the review skill, test-qa identifies problems. Fixes go through a separate implement cycle.
- Use real-ish data. Test with realistic inputs, not just "foo" and "bar". Edge cases should include things real users might actually do.
1---2name: test-qa3description: Run scaled testing against an implemented project — smoke tests, integration, end-to-end, visual UI verification, performance, and security — based on the stakes level. Use when the user wants to test a project, run QA, verify the build works, check the UI, check performance, run security tests, or validate after a review.4---56# Test/QA — Scaled Testing78Run the project, verify it works, and test it at a depth that matches the stakes.910## Trigger1112The user has implemented code (typically after the implement and review skills) and wants to verify it works correctly at runtime. A `REVIEW_REPORT.md` should exist confirming no critical issues block testing. If it doesn't exist, warn the user and recommend running review first, but proceed if they insist.1314## Workflow1516### Step 1: Assess Stakes1718Ask the user one question:1920> What are the stakes for this project?21> - **Low** — personal project or prototype (basic smoke tests)22> - **Medium** — users will depend on this (integration + E2E + basic security)23> - **High** — production, paid, or regulated (full suite including performance and security)2425This determines the depth of every subsequent step.2627### Step 2: Load Context2829Read the project artifacts:30- `PROJECT_PLAN.md` — requirements, success criteria, non-functional requirements31- `BUILD_MANIFEST.md` — how to run/test, dependencies, env vars, NFR targets32- `REVIEW_REPORT.md` — items marked "Needs Testing", known issues3334Verify the project can run:351. Check that dependencies are installed. If not, install them.362. Check that required env vars exist in `.env`. Warn about missing ones.373. Attempt to start the project. If it fails to start, stop and report the error.3839### Step 3: Detect Project Type4041Determine if the project has a web UI:42- Check for frontend frameworks in dependencies (`react`, `vue`, `svelte`, `next`, `nuxt`, `angular`, etc.)43- Check for HTML templates, CSS files, or static assets44- If a web UI is detected, enable **visual UI testing** in Steps 5, 7, and the dedicated Step 84546This flag controls whether browser automation is used throughout the remaining steps.4748### Step 4: Smoke Tests (all stakes levels)4950Verify the basics work:511. **Project starts** without errors522. **Main entry points respond** — homepage loads, API root returns expected response, CLI runs without crashing533. **Core happy path** — the single most important user flow works end to end (e.g., sign up → log in → perform main action)5455**For web UI projects:** Use browser automation (browser-use subagent) for smoke tests:56- Open the app in a browser57- Take a screenshot of the homepage58- Check the browser console for errors (JS exceptions, failed network requests, 404s)59- Verify the page is not blank and key elements are visible60- If console errors exist at startup, report them immediately6162If smoke tests fail, stop here. Report failures (with screenshots for UI projects) and recommend fixing before deeper testing.6364### Step 5: Integration Tests (medium + high)6566Test that components work together correctly:671. **API endpoints** — call each endpoint from the plan's API Surface table. Verify correct responses, status codes, and error handling for invalid input.682. **Database operations** — create, read, update, delete operations work. Data persists correctly. Relationships are maintained.693. **Authentication flows** — login, logout, token refresh, protected routes reject unauthenticated requests.704. **Third-party integrations** — external APIs connect and respond (or are properly mocked if keys aren't available).715. **Shared interface contracts** — components consuming shared types behave correctly when given valid and invalid data.7273Write test files for any integration tests that don't already exist. Use the test framework specified in the plan.7475### Step 6: End-to-End Tests (medium + high)7677Test complete user workflows:781. Identify the key user journeys from the plan's functional requirements.792. For each journey, simulate the full flow — from entry point to completion.803. Verify the outcome matches the expected behavior.814. Test with realistic data, not just "test123" inputs.8283**For web UI projects:** Use browser automation for all E2E tests:84- Navigate each user journey in the browser (click links, fill forms, submit, verify results)85- Monitor the browser console throughout — capture every warning, error, and failed network request86- Take a screenshot at each major step in the journey87- Take a screenshot immediately on any failure or console error88- Verify visual outcomes (correct page loaded, success messages appear, data displays correctly)8990For APIs, chain requests to simulate real usage patterns. For CLI tools, run full command sequences.9192### Step 7: Edge Cases & Error Handling (medium + high)9394Test what happens when things go wrong:95- Empty inputs, null values, missing required fields96- Extremely long strings, special characters, unicode97- Duplicate submissions (e.g., double-clicking a submit button)98- Expired or invalid auth tokens99- Network timeouts (if testable)100- Concurrent requests to the same resource101102### Step 8: Visual UI Testing (medium + high, web UI projects only)103104Skip this step for non-UI projects (APIs, CLIs, libraries).105106**Console audit:**1071. Collect all browser console output captured during Steps 4-71082. Categorize: errors (red), warnings (yellow), info1093. For each error — note which page/action triggered it110111**Responsive testing (medium + high):**112Test the app at three viewport sizes:113- Mobile: 375x812114- Tablet: 768x1024115- Desktop: 1440x900116117At each viewport:1181. Navigate to every key page1192. Take a screenshot1203. Check for layout breakage — overlapping elements, horizontal scroll, cut-off text, unreachable buttons1214. Verify navigation is usable (hamburger menu works on mobile, etc.)122123**Accessibility basics (high only):**1241. Check for missing alt text on images1252. Check for missing form labels1263. Check color contrast on key text elements1274. Verify the page is navigable with keyboard (tab through interactive elements)1285. Check that focus states are visible129130**Screenshot evidence:**131Save all screenshots to a `test-screenshots/` directory in the project, named descriptively:132- `smoke-homepage-desktop.png`133- `e2e-login-flow-step3-error.png`134- `responsive-dashboard-mobile.png`135136Reference these in the test report.137138### Step 9: Security Testing (high only)139140Check for common vulnerabilities:1411. **Input validation** — attempt SQL injection, XSS, command injection on all user inputs1422. **Authentication** — test for session fixation, token leakage, brute force vulnerability1433. **Authorization** — can a regular user access admin endpoints? Can user A access user B's data?1444. **Data exposure** — do API responses leak sensitive fields (passwords, tokens, internal IDs)?1455. **Secrets** — scan code for hardcoded API keys, passwords, or connection strings1466. **Dependencies** — check for known vulnerabilities in installed packages (npm audit, pip audit, etc.)1477. **Headers** — verify security headers are set (CORS, CSP, HSTS) for web applications148149### Step 10: Performance Testing (high only)150151Verify the plan's performance targets:1521. **Response times** — measure API response times against NFR targets1532. **Load handling** — if the plan specifies concurrent user targets, simulate load and measure degradation1543. **Database queries** — check for N+1 queries, missing indexes, slow queries1554. **Bundle size** — for frontend apps, verify bundle size is reasonable1565. **Memory** — check for obvious memory leaks in long-running processes157158Use the non-functional requirements from `BUILD_MANIFEST.md` as the benchmark. If no specific targets exist, use reasonable defaults and report the numbers.159160### Step 11: Produce Test Report161162Generate `TEST_REPORT.md` and save to the project root. Then launch the dashboard skill as a non-blocking subagent to regenerate `DASHBOARD.html` with the test results. Don't wait for it to complete.163164```markdown165# Test Report166167> Tested on [date] | Stakes level: [Low/Medium/High]168169## Summary170- **Smoke tests:** [pass/fail]171- **Integration tests:** [X/Y pass] (medium+high only)172- **E2E tests:** [X/Y pass] (medium+high only)173- **Visual UI:** [pass/issues found] (medium+high, web UI only)174- **Security:** [issues found / clean] (high only)175- **Performance:** [meets targets / issues] (high only)176- **Overall verdict:** Ready to ship / Needs fixes177178## Smoke Tests179| Test | Status | Notes |180|------|--------|-------|181| Project starts | Pass/Fail | [details] |182| Main entry responds | Pass/Fail | [details] |183| Core happy path | Pass/Fail | [details] |184185## Integration Tests186| Area | Tests | Passed | Failed | Notes |187|------|-------|--------|--------|-------|188| API endpoints | [N] | [N] | [N] | [details] |189| Database | [N] | [N] | [N] | [details] |190| Auth | [N] | [N] | [N] | [details] |191192## E2E Tests193| User Journey | Status | Notes |194|-------------|--------|-------|195| [journey] | Pass/Fail | [details] |196197## Edge Cases & Error Handling198| Test | Status | Notes |199|------|--------|-------|200| [edge case] | Pass/Fail | [details] |201202## Visual UI (medium+high, web UI only)203204### Console Errors205| Page/Action | Error | Severity |206|-------------|-------|----------|207| [page] | [error message] | Error/Warning |208209### Responsive Testing210| Page | Mobile | Tablet | Desktop | Issues |211|------|--------|--------|---------|--------|212| [page] | Pass/Fail | Pass/Fail | Pass/Fail | [details] |213214### Accessibility (high only)215| Check | Status | Notes |216|-------|--------|-------|217| Alt text | Pass/Fail | [details] |218| Form labels | Pass/Fail | [details] |219| Color contrast | Pass/Fail | [details] |220| Keyboard navigation | Pass/Fail | [details] |221222### Screenshots223All screenshots saved to `test-screenshots/`. See [filename] for [description].224225## Security (high only)226| Check | Status | Severity | Notes |227|-------|--------|----------|-------|228| SQL injection | Pass/Fail | Critical/Warning | [details] |229| XSS | Pass/Fail | Critical/Warning | [details] |230| Auth bypass | Pass/Fail | Critical/Warning | [details] |231232## Performance (high only)233| Metric | Target | Actual | Status |234|--------|--------|--------|--------|235| [metric] | [target] | [measured] | Pass/Fail |236237## Non-Functional Requirements Status238| ID | Requirement | Target | Result | Status |239|----|-------------|--------|--------|--------|240| NFR-01 | [requirement] | [target] | [actual] | Met / Not Met |241242## Failed Tests — Details243[For each failed test, provide: what failed, expected vs. actual, reproduction steps, suggested fix]244245## Recommended Actions2461. [Most critical fix]2472. [Second fix]2483. [etc.]249250## Next Step251[If all critical tests pass:] Ready for ship.252[If failures exist:] Fix the items above, then re-run test-qa.253```254255### Step 12: Present Findings256257Walk the user through the results:2581. Overall verdict — pass or needs work2592. Any critical failures with details2603. Security concerns (if high stakes)2614. Performance numbers vs. targets (if high stakes)2625. Recommended next steps — fix and re-test, or proceed to ship263264## Interaction Guidelines265266- **Run the code, don't just read it.** The review skill checks code by reading. This skill checks by executing.267- **Be honest about limitations.** If you can't fully test something (e.g., no API keys for a third-party service), say so. Don't report a pass you can't verify.268- **Scale to stakes.** Low-stakes projects get quick smoke tests, not a full security audit. Respect the user's time.269- **Write lasting tests.** Integration and E2E tests written during this phase should be saved to the test directory so they can be re-run later, not thrown away.270- **Don't fix, just report.** Like the review skill, test-qa identifies problems. Fixes go through a separate implement cycle.271- **Use real-ish data.** Test with realistic inputs, not just "foo" and "bar". Edge cases should include things real users might actually do.