Software Testing
What this domain tests
Testing questions reward precision about levels, techniques, and coverage criteria, and punish the belief that testing can prove absence of defects. Expect black-box design methods, white-box coverage relationships, regression strategy, and defect clustering.
Core rules and concepts
- Verification asks whether the product was built right against its specification; validation asks whether the right product was built for the user's need. A system can pass verification and fail validation.
- Levels: unit, integration, system, acceptance. System and acceptance testing are typically owned by an independent team to limit author bias.
- Black-box techniques: equivalence partitioning, boundary value analysis, decision tables, state-transition testing, pairwise/combinatorial reduction.
- White-box coverage: statement, branch/decision, condition, MC/DC, path. Branch coverage subsumes statement coverage; MC/DC subsumes decision coverage and is mandated for the highest criticality level of DO-178C in avionics. Full path coverage is usually infeasible because loop paths multiply.
- Regression testing protects against re-introduced defects; automate it and run it on every change to a baselined build.
- Defect clustering: a small fraction of modules carries most defects, so testing effort should be risk-weighted rather than spread evenly.
Worked example
An input field accepts integers from 1 to 100 inclusive. Design the tests.
Equivalence classes: valid 1-100, invalid below 1, invalid above 100, and non-integer input.
Three-value boundary analysis at each boundary gives 0, 1, 2 and 99, 100, 101: six tests, adding one interior value such as 50 and one negative, two-digit, or text input for the invalid classes.
Reasoning: defects concentrate at the edges, where < versus <= and off-by-one errors live. Testing 50 alone proves almost nothing; 0 and 101 prove that rejection paths execute, and 1 and 100 prove the boundary is accepted.
Traps that cost marks
- Confusing two-value and three-value boundary analysis, or omitting interior values entirely.
- Claiming 100% statement coverage proves correctness; a branch may be exercised with no assertion checking its outcome.
- Mixing up verification and validation when a scenario describes a satisfied specification but an unhappy user.
- Fixing a defect without adding a regression test, and closing it without retesting the surrounding area.