Normal test data

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Normal test data

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. A range check allows ages from 0 to 120. Which value is normal test data?
A -5
B 30
2. What should a program do with normal test data?
A Reject it
B Accept it
3. Which statement describes normal test data correctly?
A A typical valid value that should be accepted
B An invalid value that should be rejected
4. A quiz score must be from 0 to 100. Which is normal test data?
A 65
B 101
5. True or false: normal test data is chosen at the edge of the allowed range.
A False
B True

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1Age = 30 (range check 0 to 120) AWhat should happen when normal test data is entered into the program
2Expected outcome: accepted BNormal data is valid and should be accepted, not rejected. Also 120 is at the limit, so it is boundary data, not well inside the limits.
3Normal test data is a typical valid value that is well inside the limits and should be accepted CInput: 45, Expected output: Accepted
4A test case using normal data pairs the input with the expected outcome of accepted DIF Age >= 0 AND Age <= 120 THEN OUTPUT "Accepted" ENDIF // test with 30
5Normal test data for an age range of 0 to 120: 150 ENormal test data: a typical valid value well inside the limits, so the program should accept it
6Normal test data: 120, Expected outcome: Rejected F150 is outside the allowed range, so it is abnormal test data, not normal. Normal data must be valid, such as 30.

Definitions

Normal test data

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
IF Age >= 0 ___ Age <= 120 THEN
2.
Age _ 30 // normal test data
3.
INPUT Age IF Age >= 0 AND Age <= 120 THEN ______ "Accepted"
4.
DECLARE Age : _______
5.
IF Age >= 0 AND Age <= ___ THEN

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A Check: age is 0 to 120
B Normal test data: 150
C Expected result: accepted
Question 2
A Normal test data is rejected
B Example: age 30, range 0-120
C It is well inside the limits
Question 3
A Range check: 1 to 100
B Expected result: rejected
C Normal test data: 50
Question 4
A // Test: Age = 30 (normal)
B IF Age >= 0 AND Age <= 120
C THEN OUTPUT "Rejected"
D ELSE OUTPUT "Rejected"
E ENDIF
Question 5
A Range check: 0 to 120
B Test value: 30
C Type: abnormal
D Expected result: accepted

Answer Key

Normal test data
Section A: Quick Questions
Q1
B — 30
Q2
B — Accept it
Q3
A — A typical valid value that should be accepted
Q4
A — 65
Q5
A — False
Section B: Match the Pairs
Q1
Age = 30 (range check 0 to 120) → Normal test data: a typical valid value well inside the limits, so the program should accept it
Q2
Expected outcome: accepted → What should happen when normal test data is entered into the program
Q3
Normal test data is a typical valid value that is well inside the limits and should be accepted → IF Age >= 0 AND Age <= 120 THEN OUTPUT "Accepted" ENDIF // test with 30
Q4
A test case using normal data pairs the input with the expected outcome of accepted → Input: 45, Expected output: Accepted
Q5
Normal test data for an age range of 0 to 120: 150 → 150 is outside the allowed range, so it is abnormal test data, not normal. Normal data must be valid, such as 30.
Q6
Normal test data: 120, Expected outcome: Rejected → Normal data is valid and should be accepted, not rejected. Also 120 is at the limit, so it is boundary data, not well inside the limits.
Section C: Definitions
Q1
Normal test data — A typical, valid value well inside the allowed limits, which the program should accept. Example: an age of 30 for a range check of 0 to 120 is accepted.
Section D: Fill in the Blanks
Q1
IF Age >= 0 AND Age <= 120 THEN
Q2
Age ← 30 // normal test data
Q3
INPUT Age IF Age >= 0 AND Age <= 120 THEN OUTPUT "Accepted"
Q4
DECLARE Age : INTEGER
Q5
IF Age >= 0 AND Age <= 120 THEN
Section E: Spot the Error
Q1
B — 150 is outside the range 0 to 120, so it is abnormal data, not normal data. Normal test data must be a valid value such as 30.
Q2
A — Normal test data is valid, so the program should accept it, not reject it. The line should say 'Normal test data is accepted'.
Q3
B — 50 is a typical valid value inside 1 to 100, so the expected result is accepted. It should read 'Expected result: accepted'.
Q4
C — An age of 30 is normal data and passes the range check, so the THEN branch should output "Accepted".
Q5
C — 30 is a valid value well inside 0 to 120, so it is normal test data. Abnormal data would be invalid, such as -5.