4. The Software Development Process - Testing

Preview:

Citation preview

Testing

TestingSoftware development costs will vary from project to project. An indication of costs at different stages of the process are shown below

Testing Testing begins at the analysis and design stages,

with prototypes being developed

It is much more cost effective to fix problems at earlier stages of the software development process

Testing – common errorsErrors during detailed design stage

Incorrect interpretation of specification

Incomplete logic

Not thought of all special cases

Poor error handling

Bad time planning

Testing – common errorsErrors during coding stage

Syntax errors

Initialisation errors

Confusion of parameters

Errors in loop counters

Incorrect handling of a decision

Multiple or non-definition of variables

Errors in writing variable names

Incorrect declaration of type and dimensions

Testing – common errorsErrors during translation

Compiler errors

Confusion of library names

Testing – exercisesComplete exercises on testing

Testing Exercise 1

Testing Exercise 2

Test dataSelecting appropriate test data sets is important

Expected results should be known in advance (so the actual output can be checked against expected output)

Test Data SetsNormal Data

A normal data set should be tested to show that the program works as expected.

Test Data SetsBoundary Data Sets (Extreme Data)

A boundary data set is used to test the boundary limits within a program.

Test Data SetsExceptional Data (Out of Range Data)

Exceptional data is used to test that the program can properly handle unexpected inputs.

Phases of testing1. Procedure / Module Testing

Individual code procedures and modules tested

2. Integration TestingTest the modules work together

3. System TestingTest overall system

4. Acceptance TestingCustomer tests program against their specification

5. Alpha and Beta TestingPut the software out to users to test

Who tests? Initially, tests are carried out by the development team

Acceptance testing is carried out by the client

The final alpha and beta test are carried out by a select band of users. It is becoming common for software beta programs to be freely downloadable

Testing removes all bugs...

...wrong!

Testing can only convince us of the presence of errors, and not of their absence.

Testing can never prove conclusively that a program is correct. No matter how exhaustive the testing, it will always be possible for the system to contain errors which have not been detected.

Recommended