Presentation is loading. Please wait.

Presentation is loading. Please wait.

Testing Strategies COMP1 – Section 4.2. Testing. Aims At the end of this lesson you will be able to:  Explain different testing strategies  Design and.

Similar presentations


Presentation on theme: "Testing Strategies COMP1 – Section 4.2. Testing. Aims At the end of this lesson you will be able to:  Explain different testing strategies  Design and."— Presentation transcript:

1 Testing Strategies COMP1 – Section 4.2. Testing

2 Aims At the end of this lesson you will be able to:  Explain different testing strategies  Design and carry out basic testing  Demonstrate the importance of validation of input data

3 What can you test?  If you planned to build a car you could plan the tests to perform BEFORE you even put a nut and bolt together I want the car to stop from 60mph to 0 in 3 seconds I want the car to accelerate from 0 – 60 in 10 seconds You could create hundreds of tests Only AFTER you had built the car could you implement the tests

4 Your program  The same is true of your program or project (A2)  Create a test PLAN during the design stage Then:  Create the project Then:  Test the program/project using your test plan

5 Testing is a big area (as is Texas)  You can not hope to test all the possible combinations in your program  For example for one input variable you could enter ever possible combination of keyboard characters, clearly infeasible (and a bit silly)  We can split up the problem. This makes it simpler to manage.

6 Test Plan  Think about the things your program will be doing:  Reacting to user input Choose from menus Producing outputs like invoices  Processing calculations Are the monetary values calculated correctly Does the graph show the correct figures  Validating input See 4.1. validation and error handling Give some examples.

7 Format of the USER test plan  User testing Test no Test dataReason for choice of test data Expected Outcome Actual Outcome Comment 1Choose menu option ‘A’ for flights only’ To see if use can make choice Go to correct holiday calculator 2

8 CALCULATION test plan Test no Test dataReason for choice of test data Expected Outcome Actual Outcome 7(HolPrices added) and divided by noOfHols: 1+2+3/3 To see if the average price of holidays is calculated correctly 2 3 – need to divide by No of items added to get correct result. See screen prints 5 and 6. 8People * HolPrice 3 * 30 Cost of holidays calculated correctly 90Holiday cost calculated correctly See screen print 1 Note the test numbers follow on from the user tests Note, your program does not have to work correctly in every way. SOME errors are permitted. It is actually good to show that some areas do not work but explain how you go about solving these problems.

9 VALIDATION test plan Tes t no Test dataExpected outcome Reason for choice of test data Actual Outcome Comment 17Age:-1rejectedBelow acceptable value - boundary 18Age:10000rejectedAbove acceptable value - invalid 19Age: Blank no-input RejectedCell contains no data - erroneous 20Age:110AcceptedUpper bound of acceptable data 21Age:1AcceptedLower bound of acceptable data 22Age:25AcceptedNormal data - valid 23Age: ARejectedErroneous data - invalid Note the test numbers follow on from the calculation tests

10 Testing strategies  Black box testing  White box testing  Alpha testing  Beta testing

11 Black box testing Referred to as ‘functional testing’  Carried out independently of the code used in the program.  Create test data that covers all the inputs and outputs and program functions by looking at the specification  Examples?

12 White box testing  Referred to as ‘structural testing’  Program code is studied and tests are devised which test each possible path at least once.  Weakness: you cannot test what is not there!!!  Examples?

13 Alpha Testing  Carried out by the software developer’s in-house testing team.  Reveals errors and omissions is systems requirements definition.

14 Beta Testing  Software is tested by a number of potential users who agree to use the system and report any problems.

15 Activity in pairs:  Download testing template.doc from Moodle->COMP1->4.2. Testing  Decide on test data  Carry out testing with neighbour – SWAP seats!  Record outcomes ! If you have extra time!:  Download zip file from Moodle in 4.2.  Use 4.2. Testing of Insurance calculator program.doc to test program

16 Checking your newly gained knowledge:  testing strategies – examples?  Test plan and recording tests –What needs testing?  validation of input data – Why important?

17 Homework  COMP1-4.1.A. Validation. Question 1 in validation and error handling section from the Book on page 225.  By Tuesday


Download ppt "Testing Strategies COMP1 – Section 4.2. Testing. Aims At the end of this lesson you will be able to:  Explain different testing strategies  Design and."

Similar presentations


Ads by Google