Using equivalence classes partitioning, how many test cases are required to test this field?

For a mandatory input field "ZIP code" the following rules are given:

1 – The valid ZIP code format is 5 numeric digits.

2 – The code has to exist in the post office’s official ZIP code list

Using equivalence classes partitioning, how many test cases are required to test this field?
A . 8
B . 3
C . 6
D . 4

Answer: D

Explanation:

Equivalence classes partitioning is a technique that divides the input data and output results of a software component into partitions of equivalent data. Each partition should contain data that is treated in the same way by the component. Equivalence classes partitioning can be used to reduce the number of test cases by selecting one representative value from each partition.

For the ZIP code field, there are four equivalence classes based on the given rules:

Valid ZIP code format and valid ZIP code value (e.g., 12345)

Valid ZIP code format and invalid ZIP code value (e.g., 99999)

Invalid ZIP code format and valid ZIP code value (e.g., 1234)

Invalid ZIP code format and invalid ZIP code value (e.g., ABCDE)

Therefore, four test cases are required to test this field, one for each equivalence class.

Verified Reference: [A Study Guide to the ISTQB® Foundation Level 2018 Syllabus – Springer], Chapter 4, page 37-38.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments