Explain boundary value analysis and equivalence partitioning, and show how you would use them together on a field.
What the interviewer wants to hear
- Equivalence partitioning splits inputs into groups that should behave the same
- One value per partition is enough in theory
- Boundary value analysis tests values at and just outside the edges of partitions
- Defects cluster at edges because of mistakes like < instead of <=
- Concrete example with correct values
Model answer
Equivalence partitioning groups inputs that the system should treat the same way, so I test one value from each group instead of every value. Boundary value analysis adds tests at the edges of those groups, because developers often make off-by-one mistakes, like writing less than instead of less than or equal. Take a quantity field that allows 1 to 10 items. The partitions are below 1 (invalid), 1 to 10 (valid) and above 10 (invalid), so I might pick 0, 5 and 11. With two-value BVA I add the edges: 0, 1, 10 and 11. I also think about the input type, such as decimals, empty input, negative numbers and letters, which form extra invalid partitions. Together the two techniques give strong coverage with only a handful of tests.
Can you answer it under time pressure?
Take a timed easy round and get scored on every answer.
More easy QA Engineer questions
- How would you test a login page?
- What is the Software Testing Life Cycle (STLC) and how does it fit with the SDLC?
- How do you decide which test cases go into a regression suite?
- What does a QA engineer do in an Agile Scrum team?
- Explain positive and negative testing with an example.
- Walk me through the life cycle of a defect, from the moment you find it until it is closed.
- What is the difference between a test scenario and a test case? Give an example of each.
- How would you test a file upload feature that accepts PDF documents up to 10 MB?
- How do you plan and run an exploratory testing session, and how do you report what you found?