← VCE Software Development U3O1

Boundary test values

Test inputs at the edge of a condition. For age >= 18, test 17 (just below), 18 (exactly on) and 19 (just above) to check the algorithm picks the right path at the edge.

Understanding Boundary test values in VCE Software Development U3O1

What it does: The edge of score > 50 is 50, so the tests are 49 (just below), 50 (exactly on) and 51 (just above). The boundary number is the one written in the condition. 51 is just above it. Mistakes with >= and > only show up when we test the exact boundary value. 100 is far from the edge. You also need values like 49, 50 and 51 to check the boundary. With >, the value 18 would wrongly go down the 'no' path. 25 passes both versions, so the bug stays hidden. The value 18 sits exactly on the edge of age >= 18, so it shows whether >= was written correctly.

Common mistakes: 18 is exactly on the boundary. Because the condition uses >=, 18 is included and prints 'Adult'. The line should be: Test 18 -> Adult. Boundary tests need values just below, exactly on and just above the edge. 10 and 90 are far from 50. The line should be: Test values: 49, 50, 51.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 168–177) and word search (Modules 168–193).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
An algorithm checks: if age >= 18 then print "Adult". Which set of test values are boundary values?
5, 40, 9017, 18, 19
Matches
Condition: age >= 18. Tests: 5, 10, 90
↓
These values are all far from the boundary. They should include 17, 18 and 19 to test the edge.
Applying
Meanings
Term
Boundary values
Meaning
Test inputs at the edge of a condition. For age >= 18, test 17 (just below), 18 (exactly on) and 19 (just above) to check the algorithm picks the right path at the edge.
Practice
// Condition: age >= 18
Testing
Gaps
age <- (just below the edge)
Check Answer
Spots
2 print 'Adult'
3Test 18 -> no output

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Blobfish' badge — Pressure Handler, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. An algorithm checks: if age >= 18 then print "Adult". Which set of test values are boundary values?
A. 5, 40, 90
B. 17, 18, 19 ✓
Boundary values sit at the edge of the condition: just below (17), exactly on (18) and just above (19).
2. For the condition score > 50, which value is exactly on the boundary?
A. 50 ✓
B. 51
The boundary number is the one written in the condition. 51 is just above it.
3. For the condition temperature < 30, which value is just below the boundary?
A. 29 ✓
B. 31
Just below 30 is 29. 31 is just above the boundary.
4. Why do we test 18 when the condition is age >= 18?
A. To check the algorithm takes the right path at the exact edge ✓
B. Because 18 is a lucky number for testing
Mistakes with >= and > only show up when we test the exact boundary value.
5. A game gives a bonus if lives > 0. Which test values check the boundary?
A. 10, 20, 30
B. -1, 0, 1 ✓
The boundary is 0, so test just below (-1), exactly on (0) and just above (1). Whole-number lives could also use 0 and 1 as the key pair.

Match the Pairs

age >= 18 with test value 18 → A value exactly on the boundary, which checks that the condition includes the edge value
age >= 18 with test value 17 → A value just below the boundary, which should make the condition false
Boundary test values for score > 50: just below, exactly on and just above the edge → Test with 49, 50 and 51
A value just above the boundary checks the true path starts right after the edge → temp > 30 tested with 31
Condition: age >= 18. Tests: 5, 10, 90 → These values are all far from the boundary. They should include 17, 18 and 19 to test the edge.
Condition: mark > 50. Tests: 49, 51, 52 → The exact boundary value 50 is missing. Add 50 to check that > does not include the edge.

Key Term

Boundary values
Test inputs at the edge of a condition. For age >= 18, test 17 (just below), 18 (exactly on) and 19 (just above) to check the algorithm picks the right path at the edge.

Fill in the Blanks

1. if age >= 18 then age <- 17 (just below the edge)
Hint: Type the test value that is just below the boundary in the condition.
2. Tests for price < 20: 19, 20, 21
Hint: Type the test value that sits exactly on the boundary.
3. Tests for mark >= 50: 49, 50, 51
Hint: Type the test value that is just above the boundary.
4. Tests for speed > 60: 59, 60, 61
Hint: Type the test value that is just below the boundary number.
5. if age >= 18 then Tests: 17 no, 18 yes, 19 yes
Hint: Type the comparison operator that makes the exact boundary value pass.

Spot the Error

Question 1
A if age >= 18 then
B print 'Adult'
C Test 18 -> no output
D Test 17 -> no output
Line C — 18 is exactly on the boundary. Because the condition uses >=, 18 is included and prints 'Adult'. The line should be: Test 18 -> Adult.
Question 2
A if score > 50 then
B Test values: 10, 50, 90
C Expected: fail, fail, pass
Line B — Boundary tests need values just below, exactly on and just above the edge. 10 and 90 are far from 50. The line should be: Test values: 49, 50, 51.
Question 3
A if temp > 10 then
B print 'Wear a jumper'
C Test 9 -> Wear a jumper
D Test 10 -> no jumper
Line A — The test results show 9 prints 'Wear a jumper' and 10 does not, so the condition must be temp < 10. Using > flips the edge and breaks the tests.
Question 4
A Condition: age >= 13
B Just below: 12
C Exactly on: 15
D Just above: 14
Line C — The value exactly on the boundary is the number in the condition, which is 13. 15 is not on the edge. The line should be: Exactly on: 13.
Question 5
A input mark
B if mark > 50 then
C print 'Pass'
D else
E print 'Fail'
F Test 50 -> Pass
Line B — The test says 50 should pass, but with > the value 50 is not included and would print 'Fail'. The condition should be mark >= 50.

Student with a class code? Join your class →