Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1score <- 50 | Aage <- 16 | |
| 2score <- -5 | BAll values are normal data. There are no boundary tests (1, 100) and no invalid tests (0, 101), so the edges and rejection paths are never checked. | |
| 3Normal data is a typical value that sits well inside the allowed range | CInvalid data: a value outside what is allowed, which the algorithm should reject | |
| 4One test case per branch: every path in the algorithm is run at least once | Dif age < 13 then / else if age < 18 then / else | |
| 5Tests for a 1 to 100 range: 20, 45, 70 | EBoth tests only run the Pass branch. The else branch (Fail) is never tested, so one path is left unchecked. | |
| 6Tests for if mark >= 50 then print Pass: 80 and 90 | FBoundary data: a value exactly on the edge of a range, such as the pass mark in if score >= 50 |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
normal, boundary and invalid data — A good test set uses normal data (typical values), boundary data (values at the edges of a range) and invalid data (values that should be rejected), so every path in an algorithm is checked.if mark >= 50 then print "Pass"
else print "Fail"
// Boundary test: mark = 50if mark < 0 or mark > 100 then
print "Invalid"
// Test mark = -5 is invalid dataif mark >= 50 then print "Pass"
else print "Fail"
// Test mark = 70 is normal data// Valid range: 1 to 10
// Invalid values: 0 and 11
// Boundary values: 1 and 10if age >= 18 then print "Adult"
else print "Minor"
// Need 2 tests: one for each branch