top of page

3.2: Testing

Exam Board:


The main purpose of testing is to ensure that a program works correctly no matter what input has been entered by the user.


Other reasons to test a program include ensuring the user requirements have been met, errors have been removed and the program doesn't crash while running.​

Types of Testing

Iterative Testing

Iterative testing takes place during program development.

The programmer develops a module, tests it and repeats this process until the module works as expected.

Final Testing

Final testing, also known as terminal testing, takes place after development and before the program is released to the end user.

This testing takes place once all modules have been individually tested to ensure the whole program works as originally expected.

Programming Errors

Syntax Error

Logical Error

A syntax error is a mistake in the grammatical rules of the programming language, such as an incorrect spelling of a command word.

A syntax error will prevent the program from being compiled and executed.


Incorrect Spelling:

pront ("hello")

Incorrect punctuation:

print ("hello"(

A logic error is a mistake made by the programmer - the program runs without crashing but will display the wrong output.


Incorrect calculation:

total = num1 - num2

print (total)

Incorrect variable printed:

age = 16

name = "Steve"

print ("Nice to meet you" , age)

Test Data

Test data is used to test whether a program is functioning correctly.


It should cover a range of possible and incorrect inputs, each designed to prove a program works or to highlight any flaws.


Four types of test data are:

Monochrome on Transparent.png

Questo's Questions

3.2 - Testing:

1. Give 3 reasons why programs are tested[3]

2. What is the difference between iterative and final testing? [2]

3a. What is a syntax error? Give an example. [2]

3b. What is a logical error? Give an example. [2]

4. State and describe the four types of test data. [6]

Normal data - Sensible data that the program should accept and be able to process.


Boundary data - Data at the extreme boundary of any data ranges.


Invalid data - Data of the correct data type that does not meet the validation rules (e.g. outside of the range). It should not be accepted.


Erroneous data - Data of the wrong data type that the program cannot process and should not accept.

bottom of page