Skip to content

Estimate Testing Effort from User Stories with AI

Test StrategyUpdated 2026-10-21intermediate
TL;DR

Reads a backlog of user stories and returns testing effort estimates broken down by activity (test design, execution, automation, reporting) with a confidence level (high/medium/low) and a sanity-check flag when total testing exceeds 50% of dev estimate.

When to use it

  • You're planning a sprint or quarter and need defensible QA effort numbers.
  • You're estimating capacity to negotiate scope with product.
  • You're calibrating against historical data to see which stories you underestimated.
  • You're a fractional QA lead estimating across multiple teams.

The prompt

XML-tagged: works best with Claude
test-estimation-from-stories.claude.mdprompt
<role>You are a QA planning lead. Your estimates are explicit about confidence, broken down by activity, and called out when they exceed reasonable proportions of development effort.</role> <context>Estimating "QA effort" as a single number is useless. Break into 4 buckets: test design, test execution (manual), automation authoring, reporting/communication. Each story gets a confidence level. Sanity check: if total QA effort exceeds 50% of dev estimate, flag for re-discussion, the story is likely too big or too risky.</context> <task>For each user story:1. Estimate effort (in hours OR story points: match the user's unit) per activity bucket.2. Sum the activities into a total QA estimate.3. Assign a confidence level (High / Medium / Low) based on similarity to historical work and clarity of acceptance criteria.4. Flag stories where QA estimate > 50% of dev estimate (only when dev estimate is provided).5. Identify the largest source of uncertainty per story.</task> <input>Story list (with brief description, dev estimate if available): {stories}Unit (hours or story points): {unit}Team context (automation maturity, historical velocity): {context}</input> <constraints>- Four activity buckets, all four populated per story even if some are 0.- Confidence: High (similar work shipped recently, criteria clear), Medium (some uncertainty), Low (novel work or vague criteria).- Flag when QA estimate > 50% of dev: `(!) HIGH RATIO` with the computed percentage. If dev estimates are in days and the unit is hours, convert at 8h/day and say so in Notes. Check the ratio for EVERY story, not just the biggest.- Identify ONE source of uncertainty per story (don't list five for everything).- Total at the bottom: sum across all stories.</constraints> <output_format>Two sections:1. **Estimation table**: Story | Design | Execution | Automation | Reporting | Total | Confidence | Uncertainty | Flag.2. **Notes**: 2-3 sentences on assumptions and the largest aggregate uncertainty.</output_format> <approach>Before writing, identify which stories are most ambiguous so confidence levels are honest.</approach>

Example

Input
Story list:
1. User can upload profile photo (dev: 3 days). AC: max 5MB, jpg/png/webp, resize on server.
2. Admin can suspend a user account (dev: 5 days). AC: suspended users can't log in, can still see "account suspended" page, can be restored by admin.
3. Implement TOTP-based 2FA (dev: 10 days). AC: QR enrollment, challenge on login, recovery codes, device management.
4. Add dark mode toggle (dev: 4 days). AC: persists per-user, defaults to system preference.

Unit: hours
Team context: Mature Playwright automation. Most features ship with automation parity. Manual exploratory bandwidth limited.
Output
## Estimation table

| Story | Design | Execution | Automation | Reporting | Total | Confidence | Uncertainty | Flag |
|-------|--------|-----------|------------|-----------|-------|------------|-------------|------|
| Profile photo upload | 4h | 3h | 6h | 1h | 14h | High | File-format edge cases (corrupt, malware-like payloads) | (!) HIGH RATIO: 14h vs dev 24h = 58% |
| Admin suspend account | 6h | 4h | 8h | 2h | 20h | Medium | Session invalidation timing across services | |
| TOTP 2FA | 14h | 10h | 16h | 4h | 44h | Medium | Recovery code workflow security edge cases | (!) HIGH RATIO: QA 44h vs dev 80h = 55% |
| Dark mode toggle | 3h | 6h | 4h | 1h | 14h | High | Visual regression across 40+ pages | |
| **TOTAL** | 27h | 23h | 34h | 8h | **92h** | | | |

## Notes

Assumptions: dev estimates are accurate; days converted at 8h/day; Playwright automation parity is expected for all 4 stories. Two stories cross the 50% line: profile photo upload (58%, small dev effort but a wide file-format matrix: consider reusing an existing upload test suite) and TOTP (55%, the largest absolute estimate: break it down or pull a security consultant for the recovery code review). Admin suspend sits exactly at 50% (20h vs 40h), so it is not flagged. Dark mode's manual execution is unusually large because of the 40+ pages affected; consider whether visual regression baselines could shift hours from execution to one-time automation setup (would reduce per-release cost).

Common pitfalls

  • Model rounds to whole days when asked for hours, losing precision.
  • Confidence defaults to 'Medium' across the board: push back if it isn't varied per story.
  • HIGH RATIO flag gets omitted unless dev estimates are present AND the constraint is in the prompt.
  • Uncertainty defaults to 'requirements unclear' for everything: generic, useless; require specificity.

Tips

  • Provide dev estimates whenever possible: the HIGH RATIO flag is the most valuable output, and it requires them.
  • Re-run quarterly with actual hours-spent data from last quarter; calibration improves dramatically.
  • Use this to negotiate scope: if total exceeds team capacity, the table makes it visible which stories to cut or descope.
  • Pair with `risk-based-testing-prioritization`: high-risk stories may deserve more QA hours than estimation alone suggests.

FAQ

Story points or hours?

Whichever your team uses for dev estimates. Mixing units defeats the comparison. Hours are more direct for QA (sprint commitments, capacity planning). Points are more natural in teams that have stable point velocity.

How do I account for AI-assisted test authoring?

Reduce design and automation estimates by 20-40% if your team genuinely uses AI for these activities. Don't reduce execution or reporting: those are still human-driven. Calibrate against real data after a quarter.

What about regression effort?

Build regression into a per-sprint fixed budget (e.g., 16 hours per sprint for the QA team) rather than estimating per story. Per-story regression estimates compound to unrealistic numbers and don't reflect the actual work pattern.

Why 50% as the sanity threshold?

Empirical. When QA effort exceeds half of dev effort, the most common cause is the story is too big: break it down. The second most common is the story is high-risk: separate QA workstream may be warranted (security review, performance work, etc.).