Answer
Prioritizing Test Cases for Automation
Not every test should be automated. Wrong prioritization wastes automation effort on low-ROI tests.
Automation Candidate Matrix
Score each test on these factors (1-5 scale):
CODE
Score = Frequency × Risk × Stability × Data-Driven Potential - Manual Effort
| Test Type | Automate? | Reason |
|---|---|---|
| Regression suite (run every sprint) | ✅ Yes | High frequency = high ROI |
| Smoke tests (run every build) | ✅ Yes | Critical, frequent, fast |
| Data-driven (50 data sets) | ✅ Yes | Time-consuming manually |
| Cross-browser validation | ✅ Yes | Manual would take days |
| New feature (unstable locators) | ⏳ Later | Wait for feature to stabilize |
| One-time migration test | ❌ No | ROI too low |
| Exploratory testing | ❌ No | Requires human judgment |
| CAPTCHA/OTP flows | ❌ No | Cannot automate reliably |
| Highly visual design tests | ⏳ Maybe | Use visual testing tools |
| Infrequent edge cases | ❌ No | Manual is faster |
Priority 1 — Automate First
CODE
✅ Login / Authentication flows
✅ Core user journey (search → add to cart → checkout)
✅ API endpoint smoke tests
✅ Data entry forms with 20+ test data sets
✅ Cross-browser critical flows
✅ Nightly regression suite
✅ Tests that failed in last 3 releases
Priority 2 — Automate Next
CODE
⏳ Error message validation (forms, boundaries)
⏳ Permission/role-based access tests
⏳ PDF/Email generation triggers
⏳ Search and filter combinations
⏳ Pagination and infinite scroll
Do Not Automate
CODE
❌ Tests for features being redesigned next sprint
❌ Tests that require subjective judgment ("looks correct")
❌ Production data cleanup scripts
❌ One-time setup scripts
❌ Tests with dynamic, unpredictable data
Automation ROI Formula
CODE
ROI = (Time saved per sprint × Number of sprints) / Automation effort
Example:
Test: Login regression — 4 scenarios, 20 min manual each sprint
Automation effort: 4 hours to write
ROI = (80 min/sprint × 20 sprints) / 240 min = 6.6×
→ Good candidate: automate it
Test: Visual layout check — 1 test, 5 min manual
Automation effort: 4 hours + visual tool setup
ROI = (5 min/sprint × 20 sprints) / 240 min = 0.4×
→ Poor ROI: keep manual or use lightweight visual snapshot
Automation Coverage Target
CODE
Smoke tests: 100% automated (run on every commit)
Regression: 80% automated (run on every PR/daily)
Exploratory: 0% (always manual)
New features: Automate after 2nd sprint of stability
