CTFL 4.2.2: Use boundary value analysis to derive test cases
K3Syllabus section 4.2.2
7 original PrepBench practice questions for learning objective 4.2.2 of the CTFL 4.0 syllabus. Try the examples below and check each answer against its syllabus reference.
Practice questions
Question 1
A password must be 8 to 20 characters long. Applying 2-value boundary value analysis to the length, which set of lengths must be tested?
- 7, 8, 20, 21
- 8, 9, 19, 20
- 1, 8, 20, 100
- 7, 9, 19, 21
Show answer
- Correct answer: 7, 8, 20, 212-value BVA tests each boundary (8, 20) and its nearest invalid neighbor (7, 21).
- 8, 9, 19, 20These are interior values, not the boundary-plus-neighbor pairs 2-value BVA requires.
- 1, 8, 20, 1001 and 100 are arbitrary interior/invalid values, not the boundaries and their neighbors.
- 7, 9, 19, 219 and 19 lie inside the partition, not on the boundaries 8 and 20 themselves.
In 2-value BVA, each boundary value and its closest neighbor in the adjacent partition are tested. The boundaries of the valid partition are 8 and 20; their invalid neighbors are 7 and 21. So the required lengths are 7, 8, 20, and 21.
Syllabus section 4.2.2
Question 2
A bonus is paid for sales amounts from 1,000 to 4,999 (in whole units of currency). Using 3-value boundary value analysis on the lower boundary only, which values must be tested?
- 999, 1000, 1001
- 1000, 1001, 1002
- 998, 999, 1000
- 999 and 1000 only
Show answer
- Correct answer: 999, 1000, 10013-value BVA tests the boundary 1000 together with both neighbors, 999 and 1001.
- 1000, 1001, 1002This omits 999 below the boundary and adds 1002, which is not a neighbor of 1000.
- 998, 999, 1000This omits 1001 above the boundary and adds 998, which is not a neighbor of 1000.
- 999 and 1000 only3-value BVA needs three values; this gives only two and omits 1001.
In 3-value BVA, each boundary is tested together with both of its neighbors. For the lower boundary 1000, the values are 999 (below), 1000 (the boundary), and 1001 (above).
Syllabus section 4.2.2
Question 3
A booking form has two numeric input fields: Field day: accepts the values 1 to 31. Field month: accepts the values 1 to 12. Applying 2-value boundary value analysis to both fields, how many coverage items are there in total?
- 2
- 4
- 6
- 8
Show answer
- 2Two is the number of boundary values in a single field.
- 4Four is the number of coverage items for one field, or the boundaries of both.
- 6Six would be the coverage items 3-value BVA gives for a single field.
- Correct answer: 8Four coverage items for each of the two fields.
In 2-value boundary value analysis there are two coverage items for each boundary value: the boundary value itself and its closest neighbour in the adjacent partition. The day field has the boundaries 1 and 31, giving the coverage items 0, 1, 31 and 32. The month field has the boundaries 1 and 12, giving 0, 1, 12 and 13. That is four coverage items per field and eight in total.
Syllabus section 4.2.2
Original PrepBench practice material, not official exam questions or exam dumps. PrepBench is independent and is not affiliated with or endorsed by ISTQB®.