Robust Programs (Test Plans & Data)
1: (a) Normal (1)
(b) Invalid (or Boundary Invalid) (1)
(c) Erroneous (1)
| Test Data | Type of Test Data | Reason for Test |
|---|---|---|
| 14 | Normal | To check that a mid-range valid value is accepted. |
| (a) .......... | Boundary | To check that the lowest valid value is accepted. |
| 19 | (b) ......................... | To check that data just above the upper limit is rejected. |
| "Ten" | (c) ......................... | To check that incorrect data types are handled. |
2: (a) 11 (1)
(b) Invalid (or Boundary Invalid) (1)
(c) Erroneous (1)
3: (a) It is too vague / It does not explain what is being tested. (1)
(b) To check that a password shorter than 6 characters (5 chars) is rejected. (2)
| Test Data (Actual String) | Type of Test | Expected Outcome |
|---|---|---|
| "UserOne" | Normal | Access Granted |
| (a) ................................. | Boundary (Lower Valid) | Access Granted |
| (b) ................................. | Boundary (Upper Valid) | Access Granted |
| "Hi" | Invalid (Length) | (c) .............................................................. ........................................................................ |
4: (a) "ABCDE" (Any string exactly 5 chars long) (1)
(b) "ABCDEFGHIJ" (Any string exactly 10 chars long) (1)
(c) Error message displayed / User asked to input again. (2)
try / except (or a check) to prevent the crash if "ABC" is entered.5: (a) Runtime Error (or Execution Error) (1)
(b) num = input("Enter number")
if num.isnumeric(): (or try/except) (1)
x = int(num) (1)
else: print("Invalid Input") (1)
6: (a) It does not handle the number 16 (gap in logic). (1)
(b) Nothing / Blank / No Output (1)
(c) Entering 16 is the exact boundary (1). It would show the programmer that 16 produces no result, highlighting the missing = sign. (1)
7: (a) Should be: Invalid (1). Reason: It is the correct data type (Integer) but outside the range. (1)
(b) Should be: Erroneous (1). Reason: It is the wrong data type (String input for Integer field). (1)