Presentation is loading. Please wait.

Presentation is loading. Please wait.

COMP2001 Testing. Aims of Testing To achieve a correct system producing correct results with a variety of input data.

Similar presentations


Presentation on theme: "COMP2001 Testing. Aims of Testing To achieve a correct system producing correct results with a variety of input data."— Presentation transcript:

1 COMP2001 Testing

2 Aims of Testing To achieve a correct system producing correct results with a variety of input data

3 What is Testing ? A means of finding and correcting errors

4 Types of Errors Syntax Errors in the syntax of the language Run-time Errors which occur when statements are executed Logical NOT detected by the computer. The program is completed but gives incorrect results

5 Syntax Errors Inspection of the program’s specification design code

6 Logical Errors Test by running need to design test cases specify what results are expected compare actual results with those expected

7 Importance of Testing 1978, 59 programmers tested a 63 line program until they were satisfied that all errors had been found Ave no of errors5.9 Most errors found by 1 person9 Least errors found by 1 person3 Actual no of errors15 4 errors never found Reason: Only normal conditions tested Not all lines of code tested Test results misinterpreted

8 Purpose of Testing Used to discover errors NOT show that errors do not exist A good test case will have a high probability of discovering an error Design tests as carefully as the program being tested Tests are rarely exhaustive (not practical) To prove an absolute correctness, a mathematical proof is necessary

9 Verification Types of test cases Black box White box

10 Black Box Testing Pre-code testing The program (or parts) is regarded as a black box. Test cases derived from problem specification without actual knowledge of the code Can be devised before program is written Can involve users of the program

11 White Box Testing The program is regarded as a white box Test cases derived from detailed study of the program code

12 Testing Techniques Design test case - specify results Test for a wide range of data Test for unexpected input data Ensure each statement is executed at least once Inspect the test results carefully Always assume the program contains errors Test procedures & modules seperately After making changes TEST AGAIN!

13 COMP2001 Critical Evaluation

14 Review of project How it went What worked well What didn’t work well What steps you took to rectify What difficulties were experienced (& causes) What you might do differently next time Approx 2-3 sides A4

15 Deadlines Outline spec & planThurs 18/11 @ 12noon System InvestigationThurs 22/11 @ 2pm System AnalysisThurs 13/12 @ 2pm DemonstrationsWeek 12


Download ppt "COMP2001 Testing. Aims of Testing To achieve a correct system producing correct results with a variety of input data."

Similar presentations


Ads by Google