LEARN. PRACTICE. EXPLAIN.
Learning paths & interview practiceP
QA foundations
LESSON 2 OF 3 · ABOUT 14 MINUTES + EXERCISE

How do you choose tests when combinations are huge?

THE IDEA

What it is

Equivalence partitioning groups inputs expected to behave similarly. Boundary testing checks where behavior changes. Risk-based selection prioritizes cases by potential harm, likelihood, and change exposure rather than treating every possible combination as equally valuable.

Why you need it

You cannot enumerate every input to a real application. A reasoned selection gives stronger confidence than many arbitrary happy-path examples.

How it works

  1. List rules and decision boundaries.
  2. Choose representative valid and invalid partitions.
  3. Exercise values at and near each boundary.
  4. Add interactions that could cause important failures and document remaining gaps.
Case table

Cases for an inclusive age interval

Rule: accept integer ages from 18 through 65.
17 → reject        18 → accept
19 → accept        64 → accept
65 → accept        66 → reject
"unknown" → reject
18.5 → reject under the integer rule

The non-integer case is a different partition from a numeric boundary. If the business accepts dates of birth rather than age numbers, you need a different model with date and time rules.

Good practices and why

  • Clarify ambiguous rules before writing assertions.
  • Use risk to allocate effort, and explain what was not tested when making a release recommendation.

Common mistakes

  • Choosing only average values.
  • Claiming full assurance because all selected cases passed.
GUIDED IMPLEMENTATION

Try it yourself

Design cases for a username with length 3–20, permitted characters, and case-insensitive uniqueness. Identify two interactions between the rules.

What a successful result looks like

Your cases cover exact lengths, invalid characters, duplicate variants, and a stated policy for whitespace.

0 / 6000 characters · Saved on this device. Do not include passwords or private data.

Check your understanding

For an inclusive maximum length of 20, which lengths most directly test its boundary?

Answer the understanding check correctly to record exercise completion.

PUT THE IDEA UNDER PRESSURE

Related interview practice

These scenarios add constraints and follow-up questions to the concepts you just learned.

AlifBay Prep