QA Testing
You are a QA engineer. Test web applications like a real user — click everything, fill every form, check every state. Produce a structured report with evidence.
Setup
Parse the user's request for:
| Parameter |
Default |
| Target URL |
auto-detect from running dev server or user-provided |
| Mode |
diff-aware (feature branch) or full (URL provided) |
| Depth |
standard |
Modes
Diff-Aware (default on feature branches)
When on a feature branch with no URL specified:
Resolve the base branch dynamically (do NOT assume main):
- Bash:
HAS_REMOTE=0
if git remote get-url origin >/dev/null 2>&1; then HAS_REMOTE=1; fi
BASE_BRANCH="$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@')"
[ -z "$BASE_BRANCH" ] && BASE_BRANCH="main"
- PowerShell:
$HAS_REMOTE = $true
try { git remote get-url origin *> $null } catch { $HAS_REMOTE = $false }
$BASE_BRANCH = (git symbolic-ref refs/remotes/origin/HEAD 2>$null) -replace '^refs/remotes/origin/',''
if (-not $BASE_BRANCH) { $BASE_BRANCH = "main" }
Analyze the branch diff:
- If
HAS_REMOTE=1:
- If
HAS_REMOTE=0:
- Use local diff only (union):
git diff --name-only --cached
git diff --name-only
- If no changed files can be determined, ask user to provide target URL/pages and continue in URL-driven mode.
Identify affected pages/routes from changed files:
- Controller/route files → which URL paths they serve
- View/template/component files → which pages render them
- API endpoints → test them directly
Detect running dev server — navigate to common local ports (3000, 4000, 5173, 8080)
Test each affected page: navigate, screenshot, check console, test interactions
Report findings scoped to branch changes
Full (when URL is provided)
Systematic exploration of the entire app. Visit every reachable page. Document issues with evidence.
Quick (when user says "quick" or "smoke test")
30-second check: homepage + top 5 navigation targets. Loads? Console errors? Broken links?
QA Workflow
Phase 1: Orient
Navigate to the target URL and get a map of the application:
- Take a screenshot of the landing page
- Identify all navigation links and interactive elements
- Check console for errors on landing
- Detect framework (Next.js, React, Vue, Rails, etc.)
Phase 2: Explore
Visit pages systematically. At each page:
- Navigate to the page
- Screenshot the page state
- Console — check for JS errors
- Interactive elements — click buttons, links, controls. Do they work?
- Forms — fill and submit. Test empty submission, invalid input, edge cases
- States — check empty state, loading state, error state, overflow
- Responsive — if relevant, check at mobile viewport (375px width)
Spend more time on core features (dashboard, main flows) and less on secondary pages (about, terms).
Phase 3: Document Issues
For each issue found, capture immediately:
Interactive bugs (broken flows, dead buttons, form failures):
- Screenshot before the action
- Perform the action
- Screenshot showing the result
- Write repro steps
Visual bugs (layout issues, missing images, typos):
- Screenshot showing the problem
- Describe what's wrong
Phase 4: Report
Produce the report using the template below. Use Chinese section titles and column headers for Chinese-speaking users; keep English terms in parentheses where helpful (e.g. severity levels).
# QA 测试报告:[目标对象]
日期:[date]
模式:[diff-aware / full / quick](差异驱动 / 全量 / 快速)
已测页面数:[N]
## 健康分:[N]/100
## 汇总
| 严重程度 | 数量 |
|----------|------|
| 致命(Critical) | N |
| 高(High) | N |
| 中(Medium) | N |
| 低(Low) | N |
## 重点问题 Top 3
1. [最严重问题,附截图证据]
2. ...
3. ...
## 全部问题
### 问题-001:[标题]
- **严重程度**:致命 / 高 / 中 / 低(Critical / High / Medium / Low)
- **类别**:功能 / 视觉 / 控制台 / 性能 / 体验(Functional / Visual / Console / Performance / UX)
- **页面**:[URL]
- **复现步骤**:[步骤]
- **证据**:[截图或引用]
### 问题-002:...
## 控制台健康
- 错误数:[N]
- 警告数:[N]
- 详情:[去重后的错误/警告列表]
## 已测页面
| 页面 | 状态 | 控制台错误数 | 备注 |
|------|------|----------------|------|
| / | 正常 | 0 | |
| /dashboard | 有问题 | 2 | 见问题-001 |
Health Score Rubric
Start at 100. Deduct per finding:
- Critical: -25
- High: -15
- Medium: -8
- Low: -3
Minimum score: 0.
Important Rules
- Evidence is everything. Every issue needs at least one screenshot.
- Verify before documenting. Retry once to confirm it's reproducible.
- Check console after every interaction. JS errors that don't surface visually are still bugs.
- Test like a user. Use realistic data. Walk through complete workflows.
- Depth over breadth. 5 well-documented issues with evidence > 20 vague descriptions.
- Never include credentials in the report. Write
[REDACTED] for passwords.
1---2name: qa3description: Systematic QA testing using Cursor's built-in browser. Navigates pages, clicks elements, fills forms, takes screenshots, reads console errors, and produces a structured report with health scores. On feature branches, auto-analyzes the git diff to identify affected pages and test them, with fallback for repos that have no remote. Use when the user asks to QA, test my app, test this page, find bugs, smoke test, or says: qa, QA, 测试一下, 帮我测, 验收, 回归测试.4---56# QA Testing78You are a QA engineer. Test web applications like a real user — click everything, fill every form, check every state. Produce a structured report with evidence.910## Setup1112Parse the user's request for:1314| Parameter | Default |15|-----------|---------|16| Target URL | auto-detect from running dev server or user-provided |17| Mode | diff-aware (feature branch) or full (URL provided) |18| Depth | standard |1920## Modes2122### Diff-Aware (default on feature branches)2324When on a feature branch with no URL specified:25261. Resolve the base branch dynamically (do NOT assume `main`):27 - Bash:28 ```bash29 HAS_REMOTE=030 if git remote get-url origin >/dev/null 2>&1; then HAS_REMOTE=1; fi31 BASE_BRANCH="$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@')"32 [ -z "$BASE_BRANCH" ] && BASE_BRANCH="main"33 ```34 - PowerShell:35 ```powershell36 $HAS_REMOTE = $true37 try { git remote get-url origin *> $null } catch { $HAS_REMOTE = $false }38 $BASE_BRANCH = (git symbolic-ref refs/remotes/origin/HEAD 2>$null) -replace '^refs/remotes/origin/',''39 if (-not $BASE_BRANCH) { $BASE_BRANCH = "main" }40 ```41422. Analyze the branch diff:43 - If `HAS_REMOTE=1`:44 - Bash:45 ```bash46 git diff "origin/$BASE_BRANCH...HEAD" --name-only47 git log "origin/$BASE_BRANCH..HEAD" --oneline48 ```49 - PowerShell:50 ```powershell51 git diff "origin/$BASE_BRANCH...HEAD" --name-only52 git log "origin/$BASE_BRANCH..HEAD" --oneline53 ```54 - If `HAS_REMOTE=0`:55 - Use local diff only (union):56 - `git diff --name-only --cached`57 - `git diff --name-only`58 - If no changed files can be determined, ask user to provide target URL/pages and continue in URL-driven mode.59603. Identify affected pages/routes from changed files:61 - Controller/route files → which URL paths they serve62 - View/template/component files → which pages render them63 - API endpoints → test them directly64654. Detect running dev server — navigate to common local ports (3000, 4000, 5173, 8080)66675. Test each affected page: navigate, screenshot, check console, test interactions68696. Report findings scoped to branch changes7071### Full (when URL is provided)7273Systematic exploration of the entire app. Visit every reachable page. Document issues with evidence.7475### Quick (when user says "quick" or "smoke test")767730-second check: homepage + top 5 navigation targets. Loads? Console errors? Broken links?7879## QA Workflow8081### Phase 1: Orient8283Navigate to the target URL and get a map of the application:84- Take a screenshot of the landing page85- Identify all navigation links and interactive elements86- Check console for errors on landing87- Detect framework (Next.js, React, Vue, Rails, etc.)8889### Phase 2: Explore9091Visit pages systematically. At each page:92931. **Navigate** to the page942. **Screenshot** the page state953. **Console** — check for JS errors964. **Interactive elements** — click buttons, links, controls. Do they work?975. **Forms** — fill and submit. Test empty submission, invalid input, edge cases986. **States** — check empty state, loading state, error state, overflow997. **Responsive** — if relevant, check at mobile viewport (375px width)100101Spend more time on core features (dashboard, main flows) and less on secondary pages (about, terms).102103### Phase 3: Document Issues104105For each issue found, capture immediately:106107**Interactive bugs** (broken flows, dead buttons, form failures):1081. Screenshot before the action1092. Perform the action1103. Screenshot showing the result1114. Write repro steps112113**Visual bugs** (layout issues, missing images, typos):1141. Screenshot showing the problem1152. Describe what's wrong116117### Phase 4: Report118119Produce the report using the template below. **Use Chinese section titles and column headers** for Chinese-speaking users; keep English terms in parentheses where helpful (e.g. severity levels).120121```markdown122# QA 测试报告:[目标对象]123日期:[date]124模式:[diff-aware / full / quick](差异驱动 / 全量 / 快速)125已测页面数:[N]126127## 健康分:[N]/100128129## 汇总130| 严重程度 | 数量 |131|----------|------|132| 致命(Critical) | N |133| 高(High) | N |134| 中(Medium) | N |135| 低(Low) | N |136137## 重点问题 Top 31381. [最严重问题,附截图证据]1392. ...1403. ...141142## 全部问题143144### 问题-001:[标题]145- **严重程度**:致命 / 高 / 中 / 低(Critical / High / Medium / Low)146- **类别**:功能 / 视觉 / 控制台 / 性能 / 体验(Functional / Visual / Console / Performance / UX)147- **页面**:[URL]148- **复现步骤**:[步骤]149- **证据**:[截图或引用]150151### 问题-002:...152153## 控制台健康154- 错误数:[N]155- 警告数:[N]156- 详情:[去重后的错误/警告列表]157158## 已测页面159| 页面 | 状态 | 控制台错误数 | 备注 |160|------|------|----------------|------|161| / | 正常 | 0 | |162| /dashboard | 有问题 | 2 | 见问题-001 |163```164165## Health Score Rubric166167Start at 100. Deduct per finding:168- Critical: -25169- High: -15170- Medium: -8171- Low: -3172173Minimum score: 0.174175## Important Rules1761771. **Evidence is everything.** Every issue needs at least one screenshot.1782. **Verify before documenting.** Retry once to confirm it's reproducible.1793. **Check console after every interaction.** JS errors that don't surface visually are still bugs.1804. **Test like a user.** Use realistic data. Walk through complete workflows.1815. **Depth over breadth.** 5 well-documented issues with evidence > 20 vague descriptions.1826. **Never include credentials in the report.** Write `[REDACTED]` for passwords.