Test Automation Test Case Design Interview Questions

Reviewed by Mark Dickie · Last updated

6 questions on this page you can answer and see marked on the spot. Go to the first one

Test case design is the process of choosing the specific inputs, conditions, and expected outcomes that exercise a feature thoroughly enough to surface real defects without letting the suite balloon. For interview preparation, focus on the black-box techniques recruiters drill hardest: equivalence partitioning, boundary value analysis, decision-table testing, and state-transition testing. Know how to measure coverage, explain the gap between code coverage and functional coverage, and defend the scope of a suite to stakeholders who want every path tested. Be ready to talk through risk-based prioritization and the design choices that keep an automated suite from turning into a pile of flaky, redundant checks.

What do test case design interview questions cover?

TechniqueWhat it targetsBest used when
Equivalence partitioningInput ranges expected to behave identicallyA field accepts a wide span of valid values
Boundary value analysisOff-by-one defects at input edgesNumeric or date fields with defined limits
Decision-table testingMulti-condition business rulesLogic with several interacting if/then branches
State-transition testingSequencing and state-machine bugsLogin flows, order lifecycles, approval steps
Pairwise testingPair-wise interaction defectsMany config flags where the full matrix is too large

A strong candidate can pick the right technique for a given feature, not just recite definitions. Interviewers will hand you a sample input form or a state diagram and ask you to produce the minimal set of test cases that still covers the meaningful behavior.

How do you decide which test cases to automate?

  1. Identify the paths that run on every build: smoke tests, core checkout, authentication. Automate those first because they catch regressions early and cheaply.
  2. Rank remaining cases by failure risk and execution frequency. Automate high-risk paths that a human repeats release after release.
  3. Leave one-off exploratory or visually subjective checks to manual testers; automation costs more than it returns on those.
  4. Re-evaluate the suite each release. Retire tests for features that changed shape so the suite never quietly drifts into a maintenance tax.

Key facts

  • Tarmac's Test Automation interview questions cover 13 questions at difficulty 1–5 of 5.
  • Tarmac tracked 782 job postings asking for Test Automation in September 2026.
  • Roles asking for Test Automation advertise a median base salary of £71,250, across 166 job postings as of September 2026.
  • Tarmac last reviewed these Test Automation interview questions on 14 October 2026.

At a glance

Questions13
Difficulty1–5 of 5
FormatsTrue / false, Multiple choice, Fill in the blank, Short answer, Multiple answer

What you'll review

  1. test case design

Practice questions

Try one before you open the answer. Pick an option and press Check; it's marked on the spot.

Equivalence partitioning is a black-box test-case design technique that divides the input domain into classes such that every value within a given class is expected to produce the same pass/fail outcome, reducing the number of test cases needed.#

Options

Show answer

True. Equivalence partitioning is a black-box technique that splits the input domain into classes where all members are expected to behave the same, letting you pick one representative value per class instead of testing every input.

Why:

Equivalence partitioning is defined exactly this way in ISTQB and other testing foundations. The core idea is that if one value in a partition catches a defect, the others in the same partition likely would too, so a single representative value per partition suffices as a baseline.

An integer input field accepts values from 1 to 100 inclusive. Using the standard 2-value boundary value analysis technique, which set of test values should you use?#

Options

Show answer

The 2-value boundary value analysis set for a field accepting 1 to 100 is 0, 1, 100, 101. For each boundary, this technique tests the boundary value itself and the value immediately outside it. Those edge values are where off-by-one errors tend to cluster, so they give the most useful coverage for the fewest tests.

Why:

Boundary value analysis targets the edges of an input range because off-by-one errors cluster there. The 2-value approach selects each boundary value along with the value immediately outside it on each side: 0 and 1 for the minimum, and 100 and 101 for the maximum. The set of 0, 1, 100, 101 is therefore the correct choice. A set of 1, 50, 100 only samples the valid range and misses the edges, while 1 and 100 alone never test the just-outside values. The set of 0, 1, 2, 99, 100, 101 adds the values just inside each boundary, which is the 3-value variant rather than the 2-value one.

A registration form has a password field that accepts passwords between 8 and 64 characters, inclusive. Using equivalence partitioning and boundary value analysis, which set of password lengths covers every partition and both boundaries, includes a representative valid value, and avoids testing every possible length?#

Options

Show answer

The set of 7, 8, 36, 64, and 65 characters is the efficient choice for a password field accepting 8 to 64 characters. Equivalence partitioning yields valid and invalid length classes, and boundary value analysis adds the edges 8 and 64 plus the just-outside values 7 and 65. One interior value, 36, represents the valid class, giving full coverage with five tests.

Why:

Equivalence partitioning splits the input into a valid class (8 to 64) and two invalid classes (below 8 and above 64). Boundary value analysis then picks values on each edge of the valid class and just outside them. The set of 7, 8, 36, 64, and 65 characters hits both invalid classes (7 and 65), both valid edges (8 and 64), and one representative interior valid value (36), so every partition and boundary is covered with five tests. The set of 8, 36, and 64 characters never exercises either invalid class, so it misses the just-outside boundary checks. The set of 7 and 65 characters never exercises the valid class at all. Testing every length from 1 to 100 is exhaustive and violates the requirement to avoid testing every possible length.

A test field accepts numeric values in the inclusive range [10, 50]. In boundary value analysis, the test values selected at the inner edges of the valid range are _____ (lower edge) and _____ (upper edge), while the values just outside the valid range are _____ (below the lower edge) and _____ (above the upper edge).#

Show answer

A test field accepts numeric values in the inclusive range [10, 50]. In boundary value analysis, the test values selected at the inner edges of the valid range are 10 (lower edge) and 50 (upper edge), while the values just outside the valid range are 9 (below the lower edge) and 51 (above the upper edge).

Why:

Boundary value analysis tests values at the edges of each equivalence class. For the inclusive range [10, 50], the inner-edge valid values are 10 (the smallest valid value) and 50 (the largest valid value). The values just outside the range are 9, the nearest invalid value below the lower edge, and 51, the nearest invalid value above the upper edge. All four values must be identified to answer fully.

Equivalence partitioning divides the input domain into classes such that all values within a given class are expected to be treated _____ by the program. Because of this assumption, you need only one representative value from each partition to achieve coverage.#

Show answer

Equivalence partitioning divides the input domain into classes such that all values within a given class are expected to be treated the same way by the program. Because of this assumption, you need only one representative value from each partition to achieve coverage.

Why:

The core premise of equivalence partitioning is that every value inside a partition produces the same behavior from the program under test. If one representative value passes, all others in that partition are assumed to pass as well, which is what makes the technique an efficient way to reduce the number of test cases while still covering the input domain.

A REST API endpoint accepts an integer quantity parameter. Valid values are 1–100 inclusive. Values of 0, 101, or non-integer types are rejected with HTTP 400. Applying 2-value boundary value analysis combined with equivalence partitioning, what is the minimal complete set of integer test values for this input? List the values and briefly justify the set.#

Show answer

The minimal complete set is 0, 1, 100, 101. 2-value BVA tests each boundary with the boundary value and the value immediately outside it: 0 and 1 for the lower boundary, 100 and 101 for the upper boundary. These four values also serve as partition representatives: 0 for the invalid-low partition, 1 and 100 for the valid partition, and 101 for the invalid-high partition, so no interior value is needed.

Why:

2-value BVA selects each boundary value together with its neighbour just outside the valid range, giving 0 and 1 at the lower edge and 100 and 101 at the upper edge. Those same four integers also cover every equivalence class of integer input: 0 represents the invalid-low class, 1 and 100 represent the valid class, and 101 represents the invalid-high class. Because the boundary values already give one representative per class, adding an interior value such as 50 does not improve the set, which is why the minimal complete set is 0, 1, 100, 101.

A configuration matrix has 5 parameters, each with 4 possible values, giving 4^5 = 1024 full combinations. Name the test design technique that reduces the number of test cases while guaranteeing that every combination of values from every two different parameters appears together in at least one test case.#

Show answer

Pairwise testing (also called all-pairs testing). It generates a covering array so that every value combination for every pair of parameters appears in at least one test, usually with far fewer tests than the 1024 exhaustive combinations. Each test covers C(5,2) = 10 parameter pairs, and there are 10 pairs × 16 value combinations = 160 pair-instances to cover, so at least 16 tests are needed; a tool typically produces somewhat more.

Why:

Pairwise (all-pairs) testing selects a subset of combinations so that every pair of values from every pair of parameters is covered at least once. It rests on the observation that most configuration defects are triggered by interactions between two parameters rather than three or more. Counting the coverage requirement gives a lower bound: 10 parameter pairs each need 16 value combinations (160 total), and each test covers 10 of them, so at least 16 tests are required, which is far fewer than 1024.

You are designing an automated test suite for a REST API with these characteristics:#

Options

Pick every one that applies.

Show answer

Boundary value analysis for a bounded numeric field, state transition testing for a workflow with defined allowed transitions, and equivalence partitioning for an input domain with valid and invalid ranges are correct matches. Pairwise combinatorial testing is not the right fit for independent parameters, because it exists to expose interaction effects between parameters that the scenario rules out.

Why:

Boundary value analysis fits discount because it is a bounded numeric range, and testing at 0 and 50 plus the values just outside (−1 and 51) targets off-by-one validation errors. State transition testing fits the order workflow because it is a finite state machine with defined allowed transitions, so verifying valid transitions succeed and invalid ones (such as shipping before confirming) are rejected is its core purpose. Equivalence partitioning fits discount because its input domain splits into a valid partition (0–50) and invalid partitions (negative, above 50, non-numeric), and one representative per partition exercises each distinct validation path. Pairwise combinatorial testing is the mismatch: it targets behaviour that depends on interactions between parameters, but the scenario states the query parameters are independent, so each can be tested on its own and covering all pairs adds cost without finding new defects.

When the behavior of a system depends on the interaction of at most two input parameters at a time, _____ testing reduces the test suite from the full Cartesian product to a covering array in which every pair of values from any two parameters appears together in at least one test case. This approach assumes that defects are triggered by the interaction of at most _____ parameters, which empirical studies in software testing have largely supported.#

Show answer

When the behavior of a system depends on the interaction of at most two input parameters at a time, pairwise testing reduces the test suite from the full Cartesian product to a covering array in which every pair of values from any two parameters appears together in at least one test case. This approach assumes that defects are triggered by the interaction of at most 2 parameters, which empirical studies in software testing have largely supported.

Why:

The first blank is filled with 'pairwise' (also called 'all-pairs' or 'pairwise combinatorial' testing), the standard name for the technique that builds a covering array in which every pair of parameter values co-occurs in at least one test case. The second blank is filled with 2: the core assumption behind pairwise testing is that defects arise from the interaction of at most two parameters. If higher-order (3-way) interactions can cause failures, pairwise coverage is insufficient and a higher-strength covering array (t-wise combinatorial testing with t = 3) is needed instead.

A test automation team is designing tests for an order management state machine with the following states and valid transitions. CANCELLED and DELIVERED are terminal states with no outgoing transitions. PAID is an intermediate state that can be entered and exited in multiple ways. The valid transitions are: CREATED→PAID, CREATED→CANCELLED, PAID→SHIPPED, PAID→CANCELLED, SHIPPED→DELIVERED, SHIPPED→CANCELLED. The team wants every possible pair of consecutive valid transitions, where the target state of the first transition is the source state of the second, to be exercised at least once. Which state transition coverage criterion is defined by exactly this requirement? Give its name.#

Show answer

1-switch coverage. It requires every pair of consecutive transitions (a transition followed by one that starts at its target state) to be exercised, which is the N=1 case of the N-switch family, while 0-switch covers single transitions and 2-switch covers triples.

Why:

In state transition testing, 0-switch coverage exercises each individual transition at least once, 1-switch coverage exercises every pair of consecutive transitions where one ends at the state the next begins from, and 2-switch coverage exercises every sequence of three consecutive transitions. All-state coverage only requires each state to be visited. The team's requirement, exercising every pair of consecutive transitions, is the definition of 1-switch coverage.

A test automation team is designing a decision table for a hotel booking system's cancellation policy with three conditions: (1) Booking type: Standard, Flexible, Prepaid (3 values); (2) Days before check-in: 0-1, 2-7, 8+ (3 values); (3) Membership tier: None, Silver, Gold (3 values). Full combinatorial coverage would be 3×3×3 = 27 rules. The business rules state that Prepaid bookings are non-refundable regardless of timing or membership tier, so for the Prepaid booking type the other two conditions are don't-care entries. The team consolidates the table by merging all the Prepaid combinations into a single rule. The total number of distinct rules in the consolidated decision table is _____.#

Show answer

A test automation team is designing a decision table for a hotel booking system's cancellation policy with three conditions: (1) Booking type: Standard, Flexible, Prepaid (3 values); (2) Days before check-in: 0-1, 2-7, 8+ (3 values); (3) Membership tier: None, Silver, Gold (3 values). Full combinatorial coverage would be 3×3×3 = 27 rules. The business rules state that Prepaid bookings are non-refundable regardless of timing or membership tier, so for the Prepaid booking type the other two conditions are don't-care entries. The team consolidates the table by merging all the Prepaid combinations into a single rule. The total number of distinct rules in the consolidated decision table is 19.

Why:

Standard and Flexible booking types each combine with the 3 Days-before-check-in values and the 3 Membership tier values, giving 3×3 = 9 rules each, or 18 in total. For Prepaid bookings both other conditions are don't-care, so the 9 Prepaid combinations collapse into one consolidated rule. Total distinct rules = 18 + 1 = 19.

A team uses NIST ACTS or PICT to generate a pairwise (strength-2) test suite for a REST API with 12 enumerated input parameters, each with 2 to 5 discrete values. Which statement about this suite is correct?#

Options

Show answer

A pairwise (strength-2) suite guarantees that every combination of values from any two parameters appears in at least one test. It does not guarantee coverage of three-way combinations, so a defect that needs three parameters to take specific values simultaneously can still escape a pairwise suite.

Why:

A strength-2 covering array guarantees that every value pair from any two parameters appears in at least one generated test. It does not cover 3-way combinations, so a defect that only manifests when three or more parameters take specific values simultaneously can escape even a complete pairwise suite. The statement about covering every 3-way combination is false because triples are not guaranteed. The claim about a guaranteed minimum is false because finding the minimum covering array is computationally hard and tools return heuristic, near-minimal results. The claim about fewer tests than strength-1 is false because a strength-2 array also covers every single value, so it can never be smaller than a strength-1 array for the same parameters.

You are designing a combinatorial test suite for a configurable pricing engine with 12 parameters. Parameters P1–P3 are critical (4 values each); parameters P4–P12 are non-critical (3 values each). Two years of production incident analysis yield this fault model: 90% of field defects were triggered by the interaction of at most 2 of the 3 critical parameters with no non-critical parameter involved; 10% were triggered by the interaction of exactly 1 critical parameter with exactly 1 non-critical parameter; no recorded defect involved only non-critical parameters or any interaction of 3 or more parameters. Which test design strategy exactly matches the coverage requirements of this fault model, detecting every defect class it describes while imposing no coverage obligation on parameter interactions the model says never cause defects?#

Options

Show answer

A mixed-strength (variable-strength) covering array is the test design that matches this fault model. It requires strength 2 across the critical parameters P1–P3 and across each critical-to-non-critical pair, and places no coverage obligation on non-critical pairs or on 3-way interactions, so every defect class is covered without unnecessary tests.

Why:

A mixed-strength (variable-strength) covering array assigns different coverage strengths to different parameter subsets. The fault model has two defect classes: interactions among the critical parameters P1–P3 (at most 2 of them at a time), and interactions between exactly one critical and exactly one non-critical parameter. Strength 2 over P1–P3 guarantees every value pair among critical parameters appears in some test, covering the 90% class. Strength 2 over each critical–non-critical pair covers the 10% class. Nothing is required for non-critical–non-critical pairs or for 3-way interactions, which the model says never cause defects. The full pairwise array over all 12 parameters also detects every fault but adds mandatory coverage of non-critical pairs the model excludes. The strength-3 array over all 12 parameters covers 3-way interactions the model says never occur as defects. The full factorial over P1–P3 with non-critical parameters fixed at one default never exercises critical values alongside non-default non-critical values, so it misses the 10% class.

Related interview questions

Job market

See test-automation salaries and hiring demand from live job postings.

Practise these until they stick

That's every question we hold on this topic, and the page marks what you pick. What it can't do is remember. A free account keeps every answer, and what you miss comes back until it's right: after a day, then at longer gaps.

Start with this topic

Free · the whole bank · 100 marked answers per 30 days · written feedback on the paid plan

Interview booked? Practise the job ad instead

What moved, monthly

One email a month when the bulletin comes out: what moved in the markets we track, and the new question topics we published. Confirm your address to join. Unsubscribe any time.