National 5 Computing Science - Testing

18
Testing

Transcript of National 5 Computing Science - Testing

Page 1: National 5 Computing Science - Testing

Testing

Page 2: National 5 Computing Science - Testing

TestingTesting 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

Page 3: National 5 Computing Science - Testing

TestingThe purpose of testing is to

to identify errorsto ensure that software is fit for purposeto ensure that code is efficientto ensure that code is maintainable

Page 4: National 5 Computing Science - Testing

Test planSelecting appropriate test data sets is important, so we need to create a test plan

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

Page 5: National 5 Computing Science - Testing

Test Data Sets

Normal

Extreme

Exceptional

Page 6: National 5 Computing Science - Testing

Test Data SetsNormal Data

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

Page 7: National 5 Computing Science - Testing

Test Data SetsExtreme Data

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

Page 8: National 5 Computing Science - Testing

Test Data SetsExceptional Data

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

Page 9: National 5 Computing Science - Testing

Comprehensive testingSoftware should undergo comprehensive

testing

This means testing against a range of normal, exceptional and extreme data

It does not mean running a program a couple of times to find that it works OK.

Page 10: National 5 Computing Science - Testing

Phases of testing1. Procedure / Module Testing

Individual code procedures and modules tested2. Integration Testing

Test the modules work together3. System Testing

Test overall system4. Acceptance Testing

Customer tests program against their specification

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

Page 11: National 5 Computing Science - Testing

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

Page 12: National 5 Computing Science - Testing

Syntax ErrorsSyntax errors are errors which appear in your

code and can be misspelled keywords or using the language incorrectly

Often software development environments will highlight syntax errors for you

Syntax errors are the most common type of errors

Page 13: National 5 Computing Science - Testing

Syntax Errors

Page 14: National 5 Computing Science - Testing

Run-time (execution) ErrorsRun-time errors are those that appear when

you run your code

The syntax is correct, but the program fails to execute

Page 15: National 5 Computing Science - Testing

Run-time (execution) Errors

Page 16: National 5 Computing Science - Testing

Logic ErrorsLogic errors are those that appear when the program is running

They will not cause the program to crash but will produce unwanted or unexpected results

Page 17: National 5 Computing Science - Testing

Logic Errors

Page 18: National 5 Computing Science - Testing

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.