Test Data (CIE IGCSE Computer Science)

Revision Note

Test Yourself
Dan Turnes

Expertise

Computer Science

Test Data

Suggesting and applying suitable test data

  • Before a system is used, each sub-system must be tested to ensure it works correctly and interacts correctly with other sub-systems
  • Programs are tested by running them on a computing device while pseudocode and flowcharts must be dry run manually. Both require suitably chosen and different sets of test data. The outputs are then compared to the expected output to check if the algorithm works as intended
  • Test data comes in several generic types:
    • Normal
      • Normal test data is data that a system would be expected to handle on a day-to-day basis, be accepted by the algorithm and produce expected results
      • Examples could include entering people's names and addresses, phone numbers, student grades as a percentage, etc
      • Student percentage grades could involve test data such as: 34, 41, 56, 78, 12, 92
    • Abnormal
      • Also known as erroneous data, abnormal data is data that is expected to fail and should be rejected by the system. This is used to prove that the system works correctly by rejecting incorrect data
      • Examples of abnormal data would be entering numbers instead of someone's name, or entering text instead of numbers
      • Student percentage grades abnormal data could involve test data such as: abc, 7&n, Harry, £300, <!%, etc
    • Extreme
      • Extreme test data is the maximum and minimum values of normal data that are accepted by the system
      • Examples could include percentages (0 and 100), days in April (1 and 30) or the number of characters in a passwords range
        • For an 8-20 character range password, a password of 8 characters and another of 20 characters would be tested
    • Boundary
      • Boundary test data is similar to extreme data except that the values on either side of the maximum and minimum values are tested
      • The largest and smallest acceptable value is tested as well as the largest and smallest unacceptable value
      • For example, a percentage boundary test would be 0 and -1 (for 0) and 100 and 101 (for 100). For the days in April, 1 and 0 (for day 1) and 30 and 31 (for day 30) would be tested. For an 8-20 length password, an 8 and 7 character password would be tested as well as a 20 and 21 character password

Worked example

A programmer has written an algorithm to check that prices are less than $10.00 

These values are used as test data:     10.00     9.99     ten 

State why each value was chosen as test data. 

[3]

10.00 is boundary or abnormal data and should be rejected as it is out of range [1]

9.99 is boundary, extreme and normal data and should be accepted as it is within the normal range [1]

Ten is abnormal data and should be rejected as it is the wrong value type [1]

You've read 0 of your 0 free revision notes

Get unlimited access

to absolutely everything:

  • Downloadable PDFs
  • Unlimited Revision Notes
  • Topic Questions
  • Past Papers
  • Model Answers
  • Videos (Maths and Science)

Join the 100,000+ Students that ❤️ Save My Exams

the (exam) results speak for themselves:

Did this page help you?

Dan Turnes

Author: Dan Turnes

Dan graduated from the University of York with a BEng in Computer Science and has been a teacher and tutor of GCSE and A-Level Computer Science in the Yorkshire area for over six years. His goals are to engage students in the science of learning and to enable them to enjoy the experience. Dan's continued practice has brought him to SME to create high quality resources and support students to achieve their potential in Computer Science.