← ACARA Digital Technologies Years 9–10

Test table layout

A table with one row per test case. Its columns are test number, purpose, input, expected result, actual result and pass or fail.

Understanding Test table layout in ACARA Digital Technologies Years 9–10

What it does: Input and expected result are planned in advance. They show what you will enter and what the program should do. The actual result is filled in after running the code. Pass or fail comes from comparing it with the expected result. A test table has one row per test case. Each test gets its own row so you can see every result. A test table records what you test, what you put in, what should happen, what did happen and the verdict.

Common mistakes: The purpose column holds a text description, so it must be a string in quotes: purpose = "Normal value". Without quotes Python reads it as code and fails. Every row needs the same columns. This row has no expected result, so it doesn't line up with the others. It should be (3, "Abnormal", -1, "Err").

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 536–590) and word search (Modules 536–622).

Take this worksheet further — free with Cloodit

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

Learning
Duo
A test table has one row for each what?
Line of codeTest case
Matches
1 | Normal and boundary | 50, 100 | Accepted | Accepted | Pass
↓
Two tests are squeezed into one row. A test table needs one row per test, so this should be split into two rows (test 1 with input 50 and test 2 with input 100).
Applying
Meanings
Term
test table
Meaning
A table with one row per test case. Its columns are test number, purpose, input, expected result, actual result and pass or fail.
Practice
Test | Purpose | Input | Expected | Actual | Pass/Fail
Testing
Gaps
row = {"test": 1, "": "Normal mark"}
Check Answer
Spots
1test_no = 1
2purpose = Normal value

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

The 'Void Whale' badge — Definition Drifter, 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. A test table has one row for each what?
A. Test case ✓
B. Line of code
A test table has one row per test case. Each test gets its own row so you can see every result.
2. Which set of columns belongs in a test table?
A. Test number, purpose, input, expected result, actual result, pass/fail ✓
B. Variable name, data type, loop count, line number, author
A test table records what you test, what you put in, what should happen, what did happen and the verdict.
3. Which column says WHY you are running the test, such as 'check the lowest allowed mark'?
A. Purpose ✓
B. Actual result
The purpose column explains what the test is checking. The actual result only records what the program did.
4. Where do you write the answer you predicted BEFORE running the program?
A. Actual result column
B. Expected result column ✓
The expected result is worked out first from the requirements. The actual result is filled in after the run.
5. A tester runs a program and sees it print 12. Which column do they write 12 in?
A. Expected result
B. Actual result ✓
What the program really produces goes in the actual result column.

Match the Pairs

Test | Purpose | Input | Expected | Actual | Pass/Fail → The column headings of a test table: one column for each part of a test case.
2 | Boundary | 100 | Accepted | Accepted | Pass → One complete row of a test table, which records a single test case from number to verdict.
The input and expected result columns hold what you plan to test, decided before running the program → Input: 18 | Expected: Accepted
The actual result and pass/fail columns record what really happened when the test was run → Actual: Rejected | Result: Fail
1 | Normal and boundary | 50, 100 | Accepted | Accepted | Pass → Two tests are squeezed into one row. A test table needs one row per test, so this should be split into two rows (test 1 with input 50 and test 2 with input 100).
3 | Abnormal | -5 | Rejected | | Pass → The actual result column is blank but a Pass is recorded. You must run the test and write the actual result before deciding pass or fail.

Key Term

test table
A table with one row per test case. Its columns are test number, purpose, input, expected result, actual result and pass or fail.

Fill in the Blanks

1. row = {"test": 1, "purpose": "Normal mark"}
Hint: Type the column name that explains why the test is being run.
2. row = {"input": 85, "expected": "Pass"}
Hint: Type the column name for what the program should produce, worked out before running.
3. row = {"expected": 5, "actual": 5}
Hint: Type the column name for what the program really produced when it was run.
4. if actual == expected: print("PASS")
Hint: Type the operator that checks whether the two results are equal, so the test passes.
5. tests = [(1, 50), (2, 0), (3, 100)] rows = len(tests) print(rows)
Hint: Type the function that counts the items in the list, since each test gets one row.

Spot the Error

Question 1
A test_no = 1
B purpose = Normal value
C test_input = 5
D expected = 10
E actual = 10
Line B — The purpose column holds a text description, so it must be a string in quotes: purpose = "Normal value". Without quotes Python reads it as code and fails.
Question 2
A tests = [
B (1, "Normal", 5, 10),
C (2, "Boundary", 0, 0),
D (3, "Abnormal", -1),
E ]
Line D — Every row needs the same columns. This row has no expected result, so it doesn't line up with the others. It should be (3, "Abnormal", -1, "Err").
Question 3
A ps = ["Normal", "Edge"]
B for n, p in enumerate(ps):
C print(n, p)
Line B — enumerate starts counting at 0 by default. Test numbers in a test table start at 1, so the line should be enumerate(ps, 1).
Question 4
A expected = 10
B actual = 10
C if actual != expected:
D result = "PASS"
E else:
F result = "FAIL"
Line C — A test passes when the actual result matches the expected result. Using != marks matching results as PASS and different ones as FAIL. It should be ==.
Question 5
A table = []
B table.append((1, "Normal", 5))
C table.append((2, "Edge", 0))
D table.append((2, "Bad", -1))
E print(len(table))
Line D — Each test gets its own row with its own test number. Number 2 is used twice, so the third test is not numbered 3. The row should start with 3.

Student with a class code? Join your class →