Article

Test Data

Wednesday, 11 March 2026

Suitable Test Data

Suitable test data is used to check that a program behaves correctly for different types of input. It helps identify errors and confirm the program accepts valid input while rejecting invalid input.

A good test strategy includes several different types of data.

No Data

No data occurs when the user enters nothing.

The program should detect that nothing was entered and reject the input.

This is tested because users may press enter without typing anything.

Example:
Input: (blank)
Expected output: Reject input

Erroneous / Invalid Data

Erroneous data is input that should not be accepted by the program.

This type of testing ensures the program correctly validates input and prevents incorrect values from being processed.

Examples include:

  • Letters when numbers are expected
  • Symbols
  • Negative numbers when only positive values are allowed
  • Values outside the accepted range
  • Decimal numbers when only integers are allowed

Example tests:

Input: j → Reject input
Input: # → Reject input
Input: -6 → Reject input
Input: 8 → Reject input
Input: 2.5 → Reject input

Normal / Valid Data

Normal data is typical input that should be accepted and processed correctly by the program.

This tests that the program works correctly during normal use.

Example:

Input: 2
Expected output: Accept input

Boundary / Edge Data

Boundary data tests values at the limits of the allowed range.

These tests ensure the program correctly handles values at the edges of validation rules.

Example:

Input: 1 → Accept input
Input: 3 → Accept input

Sometimes values just outside the valid range are also tested because they are common sources of errors.

Example:

Input: 0 → Reject input
Input: 4 → Reject input