Stage 3b: Testing a system

How a system is tested: unit testing with normal, extreme and abnormal data, then integration testing.

Key words (15)

systems testing, unit testing, integration testing, module, test plan, test number, normal data, extreme data, abnormal data, live data, expected outcome, actual outcome, remedial action, test strategy, function testing

Lesson Objectives

Why is testing needed?

The system must be tested before it is implemented (installed and used). Testing:

  • Finds errors before real data is put at risk.
  • Makes sure that the system does what the requirements say it should do.
  • Is much cheaper and quicker than correcting faults after the system is in use.

Test strategies

A test strategy is the overall plan for what will be tested and in what order. The system is tested at three levels:

  • Each module - each part of the system is tested on its own (unit testing).
  • Each function - each task that the system carries out, for example a calculation, a search or a sort, is tested to make sure that it gives the correct result.
  • The whole system - all the parts are tested working together (integration testing).

Testing individual modules of the system

System validation modules need to be tested to make sure that system errors are rejected.
System validation modules need to be tested to make sure that system errors are rejected.
  • Testing individual parts (modules) of the system is also known as unit testing.
  • Any errors found will be corrected by the person who created the module (a programmer for example).
  • The module that failed the first test will then be re-tested to make sure that the error has been fixed.
System validation modules need to be tested to make sure that system errors are rejected.
System validation modules need to be tested to make sure that system errors are rejected.
  • When each module (part) of the system has been created, it must be tested to make sure that it works correctly.

Examples of modules that should be tested:

  1. Data / File structures - do tables hold data correctly?
  2. Validation rules - does the system reject unreasonable / incorrect data?
  3. Input screens - do form controls allow users to enter data correctly? Is input data in the correct format (correct currency or date formats for example)?
  4. Output screens - are output results correct, clear and complete?
Data/File structures need to be tested to make sure they hold data correctly.
Data/File structures need to be tested to make sure they hold data correctly.
Data/File structures need to be tested to make sure they hold data correctly.
Data/File structures need to be tested to make sure they hold data correctly.

1. Testing the data/file structure

File structures must be tested to make sure they can store system data correctly.
File structures must be tested to make sure they can store system data correctly.
  • Data or file structures are the database tables that are needed to store system data.
  • Tables are made up of field names, data types and properties (length, format etc.).
  • Test data must be entered into each field to make sure that the data can be stored.
File structures must be tested to make sure they can store system data correctly.
File structures must be tested to make sure they can store system data correctly.

2. Testing system validation rules

Table showing three tests of a rule that accepts only F or M. F and M are accepted, and G is rejected. Each result is a Pass.
System validation modules need to be tested to make sure that system errors are rejected.
  • Validation rules coded into the system need to be tested to make sure that data entered is reasonable or acceptable.
  • Each rule must be tested to make sure that it works and blocks data entry errors.
Table showing three tests of a rule that accepts only F or M. F and M are accepted, and G is rejected. Each result is a Pass.
System validation modules need to be tested to make sure that system errors are rejected.

3. Testing system inputs

Input methods and formatting must be tested to make sure they function correctly.
Input methods and formatting must be tested to make sure they function correctly.
  • Data can be entered into the system in a variety of different ways - text box, drop-down list, option button, check box etc.
  • Each one must be tested to make sure that the data is captured correctly.
  • If data requires special formatting, this must also be tested. For example - is a date being captured as dd/mm/yyyy? Are currency values correct?
Input methods and formatting must be tested to make sure they function correctly.
Input methods and formatting must be tested to make sure they function correctly.

4. Testing system output formats

System outputs must be checked for accuracy.
System outputs must be checked for accuracy.
  • Outputs could be in the form of a variety of reports that show specific system data.

Reports must be tested to check the following:

  • Does the report display the correct information?
  • Is the information complete?
  • Do outputs include company data like name, logo, contact details etc.?
System outputs must be checked for accuracy.
System outputs must be checked for accuracy.

Testing individual modules of the system (images)

System data entry modules need to be tested to make sure that data can be entered correctly.
System data entry modules need to be tested to make sure that data can be entered correctly.
System output modules need to be tested to make sure that results are correct (like this payroll example).
System output modules need to be tested to make sure that results are correct (like this payroll example).

Using a test plan

System modules should be tested using a testing plan with normal, extreme and abnormal test data.
System modules should be tested using a testing plan with normal, extreme and abnormal test data.
  • Testing a system involves creating and using a test plan. A test plan will test that every system module works.

A good test plan will include:

  • The test number
  • The test data to be used in the test
  • The type of test - normal / extreme / abnormal
  • The expected outcome of the test
  • The actual outcome of the test should be logged (data accepted / rejected).
  • Remedial action - what needs to be done to rectify the problem (if there is one)
System modules should be tested using a testing plan with normal, extreme and abnormal test data.
System modules should be tested using a testing plan with normal, extreme and abnormal test data.

Testing with normal, extreme and abnormal data

A test plan should always use four types of testing data:

  • Normal data
  • Extreme data
  • Abnormal data
  • Live data

Scenario:

Imagine we were testing a system module (text box) to make sure that it will only accept entries of numbers between 1 and 5.

The test data would look similar to the example in the table below.

Test data to accept numbers between 1 and 5

Type of test dataDescriptionExample
Normal data

Data which should be accepted and pass the test without any problems.

(In our example, this was any number between 1 and 5).

The numbers 1, 2, 3, 4 or 5 should be accepted.

Extreme data

Data which is on the border of what the system will accept.

Using the same scenario as above, the numbers 1 and 5 would be used to test the borderline data.

Abnormal data

Data that should not be accepted by the system.

(In our example, this is any data other than 1, 2, 3, 4 or 5).

Examples of data that should be rejected by the system could be 0, 6, Two, Hello, etc.

An example test plan

Any module errors found during testing need to be corrected and then retested.
Any module errors found during testing need to be corrected and then retested.
  • The table below demonstrates an example test plan that could be used to test a system module that will be used to accept the age of a driving test candidate.
  • The module should accept ages within the range of 17 - 70. Any other data should be rejected.
  • If testing identifies errors with the module, it would be corrected and re-tested.
Any module errors found during testing need to be corrected and then retested.
Any module errors found during testing need to be corrected and then retested.

Testing a module to accept numbers between 17 and 70

Test numberData enteredType of test dataExpected outcomeActual outcomeRemedial action
120NormalAccept

This section would be filled in by the tester and will log what actually happened as a result of each test.

If any of the actual outcomes were different to the expected outcome, the module would have to be corrected and then re-tested.

This section is filled in for any tests that failed.

Remedial action describes what needs to be done to fix the error.

245NormalAccept
359NormalAccept
417ExtremeAccept
570ExtremeAccept
6ThirtyAbnormalReject (error message)
716AbnormalReject (error message)
871AbnormalReject (error message)
9-10AbnormalReject (error message)

Testing the system as a whole (integration testing)

Integration testing is where the system is tested as a whole, across the entire organisation.
Integration testing is where the system is tested as a whole, across the entire organisation.
  • Once individual parts of the system have been tested and any problems solved, the system will be tested as a whole:
  • Testing the system as a whole is known as integration testing.
  • Any problems found during whole system testing will be corrected and then re-tested.
  • Integration testing uses live data (that the company actually uses) to make sure the system can accept and use it.
  • Live data has already been used in the current system, so the correct results are known and can be compared with the results from the new system.
Integration testing is where the system is tested as a whole, across the entire organisation.
Integration testing is where the system is tested as a whole, across the entire organisation.

Why test the system as a whole?

Fully tested systems are more likely to work properly and lead to a more productive workplace.
Fully tested systems are more likely to work properly and lead to a more productive workplace.
  • Testing the system as a whole makes sure that all of the individual modules work with each other correctly:
  • For example - a data entry form might allow a user to enter their date of birth correctly, but when submitted, this data might not be clearly visible on the report.
  • Whole system testing identifies this issue, and the developer will reformat the report so that fonts are clearer.
Fully tested systems are more likely to work properly and lead to a more productive workplace.
Fully tested systems are more likely to work properly and lead to a more productive workplace.

End of the topic

You've completed the topic: lesson 5 of 8 published in this unit, and already 60% of the way through. Keep it up!

60%

When you are ready, click the Next button below to move on to Stage 4: Implementation.