Test Strategy, Planning, and Risk-Based Prioritization Questions
Deciding what to test, how, in what order, and where to concentrate limited effort. Covers building a test strategy and test plan and the difference between them, scoping coverage against goals and constraints, the automate-versus-manual decision for a specific test, the automation business case (break-even, payback, and how to measure it), balancing speed, quality and cost, and risk-based testing: assessing feature and change risk, severity and likelihood scoring, prioritizing under time pressure, defending coverage trade-offs when the schedule does not allow testing everything, and judging release readiness. The scope is the investment and prioritization DECISION. Which test level a given test belongs at, and how a pipeline run should behave at execution time, are covered separately.
You join a team with an existing suite of 200 manual test cases across UI, API, and backend. Describe the key factors you would use to decide which test cases to automate first. Consider frequency of execution, code volatility, repeatability, ROI, required infrastructure, and team skill levels. Provide a prioritized list of the top 5 test cases (by type or example) and a one-line justification for each choice.
Sample Answer
Direct answer
With 200 existing manual test cases and limited automation capacity, the right approach is to rank by a combination of execution frequency, code volatility (inverted: prefer stable code), repeatability, expected ROI, required infrastructure, and team skill level, then commit to automating the highest-scoring handful first rather than trying to cover breadth thinly.
Structured elaboration
The ranking factors, and why each matters:
- Frequency of execution: a test run every release pays back an automation investment far faster than one run once a year.
- Code volatility: prefer stable areas first; automating a test on code that changes weekly means constant rewrites eating the payoff.
- Repeatability: does the test assert something mechanical and deterministic, or does it need human judgment.
- ROI: manual time saved per run times frequency, against estimated build effort.
- Required infrastructure: a test needing a full multi-service staging environment costs more to automate than one that hits a single well-isolated API.
- Team skill levels: if the team is still building automation skill, starting with a few high-value, low-complexity wins builds momentum and credibility before tackling the hardest cases.
Combine these into a ranked list, and pick the top items where the combination of high frequency, high ROI, and low infrastructure cost lines up, rather than picking purely by ROI (which can favor rare, complex tests with a deceptively high theoretical payback that takes years to realize) or purely by frequency (which can favor trivial checks with little real defect-catching value).
When automation capacity itself is the hard constraint, for example three automation engineers able to convert only the top 50 of the 200 cases over three sprints, turn the same ranked list into an explicit scoring formula (a weighted sum of frequency, business impact, historical failure rate, and estimated automation effort) with a stated tie-breaker for cases that land at the same score, such as preferring the case with the lower estimated build effort so more of the 50-case budget converts into shipped coverage rather than being consumed by one expensive outlier.
Worked example
Given 200 manual test cases across UI, API, and backend, a prioritized top 5 might look like:
- API-level login validation (runs every commit, minimal infra, high repeatability): automates in hours, saves minutes on every one of hundreds of weekly runs.
- Checkout happy-path regression (runs every release, moderate infra via a payment sandbox, high business impact): highest ROI once built, justifies more setup effort.
- User-permission boundary checks (runs every release, low infra, high business impact since a permission bug is a security issue): cheap to build, high value to catch early.
- Search-results pagination correctness (runs frequently, purely API-level, deterministic): cheap and repeatable, good early win.
- Password-reset email delivery confirmation (runs every release, moderate infra needing an email-capture sandbox, moderate business impact): slightly more setup cost but still clearly worth automating before the long tail of one-off manual checks.
Left manual for now: exploratory usability passes, rare edge-case verifications for bugs that have not recurred, and anything on a screen currently mid-redesign, regardless of how theoretically valuable automating them might eventually be.
Trade-offs and pitfalls
A pure ROI ranking can be misleading if it does not account for build cost realistically; teams frequently underestimate automation effort for anything touching third-party integrations or complex setup, which inflates the apparent ROI of hard cases. The other common trap is chasing coverage breadth (automate a little of everything) instead of depth on the highest-value cases first, which produces 200 shallow automated checks instead of 20 automated checks that actually catch the regressions that matter.
Explain risk-based testing as a QA strategy. Define the key steps you would take to implement risk-based testing for a mid-sized web application, and list the criteria you would use to rank features or test cases by risk.
Sample Answer
Direct answer
Risk-based testing is a strategy for allocating limited testing effort in proportion to the likelihood and impact of failure, rather than treating every feature or code path as equally worth testing. Instead of asking "have we tested everything," it asks "have we tested the things most likely to break and most costly if they do," and it deliberately spends less effort on low-risk areas so that high-risk areas get more depth.
Structured elaboration
Implementing risk-based testing for a mid-sized web application follows a repeatable sequence:
- Inventory the testable surface: list features, user flows, and integration points at a granularity coarse enough to score (a handful of features, not every button).
- Score each item on two axes: likelihood of a defect (how complex is the code, how recently and frequently has it changed, how many past defects has it had) and impact if it fails (revenue exposure, number of users affected, regulatory or safety consequence, reputational damage).
- Combine into a risk score, typically likelihood times impact, and rank the inventory from highest to lowest.
- Allocate testing depth by rank: high-risk items get the deepest coverage (multiple test levels, edge cases, negative paths); low-risk items get a thin smoke check or none at all.
- Revisit the ranking as the system changes: a feature that was low risk becomes high risk the moment it starts touching payments or PII (personally identifiable information), so the scoring is not a one-time exercise.
The criteria used to rank features or test cases typically include: business impact (revenue, user reach, brand/legal exposure), likelihood of failure (code complexity, change frequency, historical defect density, how new or unproven the implementation is), and detectability (would a failure surface immediately in monitoring, or silently corrupt data for days before anyone notices). A feature that is both hard to get right and hard to detect when wrong deserves the most testing attention of all, even if it is used by relatively few people.
Worked example
Take a mid-sized e-commerce web application with four candidate areas: payment checkout, profile editing, admin role management, and a newly-launched search algorithm. Score each on a 1-5 scale for likelihood and impact:
| Area | Likelihood (1-5) | Impact (1-5) | Risk score |
|---|---|---|---|
| Payment checkout | 3 | 5 | 15 |
| Admin role management | 4 | 4 | 16 |
| New search algorithm | 5 | 2 | 10 |
| Profile editing | 2 | 2 | 4 |
Admin role management scores highest here specifically because it is both newly changed (likelihood 4, it was just refactored) and high impact (a role-permission bug can expose data across tenants). Payment checkout is close behind on pure impact. The search algorithm is genuinely likely to have bugs (it is brand new) but its blast radius is smaller (bad ranking degrades experience, it does not lose money or leak data), so it lands third. Profile editing, changing rarely and low blast radius, gets the least investment: a smoke test, not a full regression suite. This ranking, not raw feature count, is what should drive the sprint's test-case allocation.
Trade-offs and pitfalls
Risk-based testing only works if the scoring is honest and revisited; teams that score once at project kickoff and never update it end up testing what USED to be risky. It also requires genuine cross-functional input (engineering for likelihood, product or business for impact) or the scores collapse into engineer-only intuition, which tends to systematically underweight business and compliance exposure it cannot see directly. The biggest pitfall is treating a low risk score as "zero testing forever" rather than "proportionally less testing now," since risk profiles shift as a feature ages, gains new integrations, or accumulates undocumented workarounds.
You inherit a test suite that currently takes 6 hours to run and blocks CI. Provide a prioritized 3-5 step plan you would execute in the first two weeks to provide faster CI feedback while preserving test quality. Include short-term and medium-term actions.
Sample Answer
Direct answer
For a 6-hour suite blocking CI, the first two weeks should focus on cheap, high-leverage wins: parallelizing what already exists, quarantining the slowest and least valuable tests out of the blocking path, and identifying a small set of fast checks that can run on every commit while the full suite moves to a less frequent schedule, rather than attempting a full rewrite immediately.
Structured elaboration
A prioritized 3-5 step plan for the first two weeks:
- Measure first (day 1-2): identify exactly which tests are consuming the most time and which are contributing the most flakiness, since fixing the wrong bottleneck wastes the limited window.
- Parallelize what already exists (days 2-5, short-term action): if the suite runs serially, splitting it across multiple parallel workers is usually the fastest way to cut wall-clock time without touching individual tests, often a same-week win.
- Quarantine the worst offenders (days 3-7, short-term action): pull the slowest and flakiest tests out of the blocking path into a separate, non-blocking nightly run, immediately unblocking fast feedback for the majority of commits while those specific tests get proper attention later.
- Stand up a fast smoke tier (week 2, medium-term action): identify or write a small set of the highest-value, fastest tests that can run on every commit for immediate feedback, with the full suite moved to run less frequently (nightly, or on merge to main rather than every commit).
- Communicate the interim trade-off (ongoing): make clear to the team that the full suite is temporarily running less often, and what residual risk that implies, while the underlying speed work continues beyond the two-week window.
Worked example
Concretely: measurement on day 1 shows that of the 6-hour suite, 20 tests account for over 2 hours combined due to a shared slow database-seeding step, and 15 tests are responsible for most of the observed flakiness. Days 2-5: splitting the suite across 4 parallel workers cuts wall-clock time from 6 hours to roughly 1.5 hours immediately, a same-week win with no test-level changes required. Days 3-7: the 15 flaky tests move to a nightly quarantine run, removing their noise from the per-commit blocking path. Week 2: a curated smoke tier of 30 fast, stable, high-value tests (covering the core user journeys) is identified and configured to run on every commit in under 10 minutes, with the full parallelized suite still running on merge to the main branch. By the end of two weeks, per-commit feedback has gone from an unusable 6 hours to under 10 minutes for the smoke tier, with the full suite still available (in 1.5 hours) at merge time, and the 15 flaky tests are visibly tracked for root-cause work in the following weeks rather than silently ignored.
Trade-offs and pitfalls
The main pitfall in the first two weeks is trying to fix root causes (rewriting slow tests, root-causing every flaky test) before applying the cheap structural wins (parallelization, quarantine, a fast smoke tier), which burns the limited early window on deep work that takes much longer to pay off. The other pitfall is quarantining flaky tests and never returning to them, which trades an acute pain (blocking CI) for a silent, chronic one (declining trust in the nightly suite as it accumulates un-investigated flakiness).
Design a test coverage and validation plan for a payments service that handles authorizations, captures, refunds, and fraud checks. Include types of tests (unit, contract, integration, e2e), priority scenarios, non-functional testing needs, and how you would validate reconciliation and financial correctness.
Sample Answer
Direct answer
A test coverage and validation plan for a payments service handling authorizations, captures, refunds, and fraud checks needs deep coverage on financial correctness specifically, since that is the class of bug with the highest cost, and should validate reconciliation not just through functional tests but through an explicit ledger-matching check that catches the kind of subtle discrepancy functional tests alone would miss.
Structured elaboration
Test types and what each targets:
- Unit tests: the calculation logic for each operation in isolation (authorization amount validation, capture amount not exceeding the authorized amount, refund amount not exceeding the captured amount, currency rounding).
- Contract tests: the API contract between this service and both its upstream callers and the downstream payment processor, catching breaking changes on either side before they reach a shared environment.
- Integration tests: the full authorize-capture-refund lifecycle against a real (sandboxed) processor, including realistic failure responses (declined, processor timeout).
- End-to-end tests: a small set of full customer-journey tests (purchase, partial refund, full refund) run against the complete system.
Priority scenarios: authorization and capture correctness (money is only captured for what was authorized), refund correctness (a refund never exceeds what was captured, and partial refunds sum correctly across multiple refunds on the same transaction), duplicate-request handling (a retried authorization or capture does not double-charge), and fraud-check integration (a flagged transaction is correctly held or declined, and a legitimate transaction is not incorrectly blocked).
Non-functional testing needs: latency under peak load (a slow authorization check directly costs conversions), and resilience to a slow or unavailable fraud-check or processor dependency (does the system fail safe, rejecting the transaction, rather than failing open and processing an unchecked payment).
Validating reconciliation and financial correctness: beyond functional pass/fail tests, run a reconciliation check that compares the service's own transaction ledger against the payment processor's records in the test environment after a batch of test transactions, asserting they match to the cent. This catches classes of bugs (a rounding difference that is individually invisible but accumulates, a transaction that is recorded locally but never actually reached the processor) that ordinary functional assertions on individual transactions would not surface, because each individual test might pass while the aggregate ledger quietly diverges.
Worked example
A concrete reconciliation check: process a batch of 50 test transactions with a mix of full captures, partial captures, and partial refunds through the sandboxed processor, then sum the service's recorded net amount per transaction and compare it against the processor's own reported settlement amounts for the same batch. A passing check requires an exact match, to the cent, for every transaction; any discrepancy, even a single cent on one transaction, is treated as a release-blocking defect rather than rounded away, since an unexplained financial discrepancy at any scale indicates a real correctness bug rather than acceptable noise.
Trade-offs and pitfalls
The most dangerous gap is validating each transaction type in isolation without ever checking the aggregate ledger, since individually-passing tests can still hide a systemic rounding or double-counting bug that only shows up when many transactions are summed. The other common mistake is treating fraud-check failures as purely a business-logic concern rather than a resilience concern, missing the question of what the system does when the fraud-check dependency itself is slow or down.
You maintain automation across multiple services owned by different teams. Describe how you'd decide whether to centralize reusable automated tests (shared libraries) or keep each team’s tests local. List pros/cons and the decision criteria you would use.
Sample Answer
Direct answer
Whether to centralize reusable automated tests into shared libraries or keep each team's tests local depends mainly on how much genuine overlap exists in what different teams are testing: centralize the parts that are truly common across teams (shared authentication flows, common UI component behavior), and keep team-specific business logic local, since forcing everything into one model regardless of overlap tends to produce either wasted duplication or an over-centralized dependency that slows everyone down.
Structured elaboration
Pros of centralizing: avoids duplicated effort when multiple teams would otherwise each build their own version of the same underlying test utility (a shared login helper, a shared way to seed common test data); ensures consistency, a bug fix or improvement to the shared library benefits every team at once rather than needing to be separately re-discovered and fixed by each team independently.
Cons of centralizing: creates a shared dependency that requires its own ownership and governance, a change to the shared library can unexpectedly break multiple teams' test suites at once if not carefully managed; and can slow teams down if they need a change to the shared library and have to wait on a different team (the library's owners) to make it, rather than being able to move independently.
Pros of keeping local: teams move independently without needing to coordinate changes through a shared dependency; test code stays close to and tailored for the specific domain logic it verifies, which can be simpler to understand and maintain for that team specifically.
Cons of keeping local: duplicated effort across teams solving the same underlying testing problem repeatedly; inconsistency, since each team's independently-built approach can diverge in quality and reliability over time with no shared bar.
Decision criteria: the degree of genuine, ongoing overlap (is this the same underlying capability multiple teams need, like authentication, or does it just look similar on the surface but actually tests different domain logic per team); the expected frequency of change (a stable, rarely-changing shared utility is a much safer centralization candidate than one that needs frequent updates, since frequent updates are where shared-dependency coordination costs bite hardest); and whether a clear owning team exists and has the capacity to maintain the shared library as a first-class responsibility, not an unfunded side project, since an unmaintained shared library becomes a liability for everyone depending on it.
Worked example
Concretely: authentication and user-session setup are needed identically by nearly every team's tests, change rarely, and are conceptually the same thing regardless of which team is testing. This is a strong centralization candidate: a shared authentication-test-helper library, owned by a specific team (often the platform or infrastructure team) with an explicit maintenance commitment. In contrast, each product team's core business-logic validation (how one team's specific pricing rules work, how another team's specific inventory logic works) looks structurally similar (both are "verify business rule X produces output Y") but tests genuinely different, team-specific domain knowledge that changes at each team's own independent pace; this stays local to each team rather than being forced into a shared library that would require coordinating unrelated teams' independent change schedules through one shared dependency.
Trade-offs and pitfalls
The most common mistake is centralizing based on surface-level similarity (both look like "test utility code") rather than genuine underlying overlap, producing a shared library that different teams pull in incompatible directions as their actual needs diverge, which becomes harder to maintain than if each had stayed local from the start. The second mistake is centralizing a capability without a clearly funded owning team, producing a shared dependency everyone relies on but nobody is explicitly responsible for keeping healthy, which tends to decay until teams start working around it instead of through it.
Unlock Full Question Bank
Get access to all 39 Test Strategy, Planning, and Risk-Based Prioritization interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.