Test Case Design and Edge Case Analysis Questions

Systematically deriving the cases, inputs, and conditions most likely to expose defects. Covers formal test-design techniques (equivalence partitioning, boundary value analysis, decision tables, state transitions, and pairwise/combinatorial design) and writing clear, maintainable test cases with documented expected results. Also covers the edge-case mindset: boundary conditions, invalid and unexpected inputs, corner cases, and the attention to detail that anticipates failures when validating complex behavior.

MediumTechnical
141 practiced

Design a decision table and derive test cases for a payment processing flow with the following conditions: card-valid (yes/no), 3DS-required (yes/no), and merchant-status (active/blocked). For each combination determine the expected outcome (approved, declined, 3DS-challenge, blocked) and list the minimum test cases required to cover the decision table effectively.

MediumTechnical
88 practiced

Construct a decision table for a Shipping Cost calculator that depends on: weight bracket (<=1kg, 1-5kg, >5kg), destination (domestic, international), and speed (standard, express). Show the decision table and derive a minimal set of test cases that covers each rule and boundary.

EasyTechnical
119 practiced

For a numeric field 'age' constrained to integers 0 through 120 inclusive, list the set of Boundary Value Analysis test cases you would write. Include the typical BVA set for both single-variable and a small multi-field scenario where 'age' interacts with a 'retirement-flag' enabled for age >= 65. Explain why each BVA case is necessary.

EasyTechnical
139 practiced

What is an off-by-one error, and why does it happen so easily around boundaries? Give at least four concrete real-world examples spanning different domains: a loop or array-indexing bug, a date/time window (inclusive vs. exclusive endpoints, month boundaries for a metric like Monthly Active Users), a sequence-alignment bug in an ML pipeline (tokenized inputs vs. labels), and a counter or term-number bug in a distributed protocol.

MediumTechnical
72 practiced

Write pytest unit tests for a function median(lst) in Python that returns the median value of a list of numbers. Provide at least six test cases covering: odd-length lists, even-length lists, single-element lists, lists with duplicates, inputs mixing ints and floats, and malformed lists containing None/NaN. Show how you'd use parametrization and approximate floating-point comparisons where appropriate. The focus is on test code, not implementing median.

Unlock Full Question Bank

Get access to all 29 Test Case Design and Edge Case Analysis interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.