Download presentation
Presentation is loading. Please wait.
1
Computer Science Testing
2
Testing User Requirements (from last lesson)
I would like a paper aeroplane that is 21cm long, but the nose and tail must be separately defined (so there is a break in the middle). I do not want the plane to be wider than 8cm. I want CR Planes logo on either side of the tail and I would like a happy face on the front of the plane. What tests can you think of, that make sure your planes have met the user requirements from above? CR Planes
3
Learning Objectives Success Criteria
Book Title: Testing Learning Objectives be able to create suitable test plans and carry out suitable testing to demonstrate their solutions work as intended understand the different types of tests that can be used, including unit/modular testing be able to hand test simple code designs/algorithms using trace tables Success Criteria ALL— will understand the purpose of testing and create a suitable test plan. MOST— will know the different types of testing used. SOME— will be able to hand test code using trace tables.
4
Test Plans How can you know whether your code / program does what it is supposed to? It might run and give you an output – but does it do what you expect it to? It is important that you think about this before you write the program so you don’t move the goalposts later!
5
What do they look like? Not always necessary!
Test Purpose Test Data? Expected Outcome Actual Outcome Improvements? Not always necessary! Depends on the programme…
6
Testing Numbers / Dates
Check both ends of the allowed range. Check data that’s not allowed and just outside the range. This is known as testing boundary data or extremes.
7
Testing Numbers / Dates
8
Six Tests for 1 Validation Rule?!
Notice that we have ended up with six tests to test one validation rule because we have tested: Valid data entry values: anything between 1 and 10 in this case Invalid data entry values: still a number but not in the allowed range, breaks the rules Erroneous data entry: something that is not a number at all Boundary data entry: checking the extremes (1 & 10) and one value outside of the extremes (0 & 11)
9
Testing Text Tests here check: Valid data Invalid data
10
Planes Test Plan Going back to our planes:
What tests can you do to test whether you have met the user requirements? “I would like a paper aeroplane that is 21cm long, but the nose and tail must be separately defined (so there is a break in the middle). I do not want the plane to be wider than 8cm. I want CR Planes logo on either side of the tail and I would like a happy face on the front of the plane.”
11
Test Plan Create a test plan similar to below (probably without the test data column – as we’re not working with a computer programme) You need to get a partner to do the testing. Why do we get someone else to test it for us? Why not just do it ourselves? Test Purpose Test Data? Expected Outcome Actual Outcome Improvements?
12
Ways to Test Tracing Algorithms Unit / Module Testing
Integration Testing Alpha Testing Beta Testing Acceptance Testing
13
Trace Algorithms Logical errors are hard to find.
Use a trace table to find the value of each variable throughout the program. (We assume the value 4 was entered)
14
What problem did you find?
Draw a Trace Table What problem did you find? TotalScore Count Output
15
The Trace Table Why are these useful?
16
Types of Testing Type of Testing What is it?
Picture to help remember it Tracing Algorithms Unit / Module Testing Integration Testing Alpha Testing Beta Testing Acceptance Testing
17
Unit / Module Testing Complex piece of software will be broken down into modules, which may be written by different programmers. Each unit or module will need to be tested on its own to make sure it does what it was supposed to do.
18
Integration Testing All the separate modules will need to be brought together (integrated) into one system. They all “should” work together but each programmer may have made assumptions that affect how their module works with other parts of the system. It is important to test the whole system after the modules have been integrated.
19
Alpha Testing (aka Peer Review)
Getting other developers within the company to peer-review it. Developers are only human and sometimes they are too close to the coding to see how well it really works. A colleague will use the software with no expectations and see it how a real user might. This may highlight areas that need improving.
20
Beta Testing If this is commercial software, the company may not want to launch the product to everyone straight away. Beta testing is when the software is given to a small group of potential customers so it can be tried out in the real world. For example, if you have developed a phone app, you may have tested it on three or four types of phone but real customers will try it out as it would really be used and on lots of different phones. Usually these customers get the software free or cheap in return for feedback.
21
Acceptance Testing If software has been developed for a specific customer based on their requirements, then they will want to do Acceptance Testing. This is where the developer will go through a test plan of agreed tests with the customer, to prove that the software does what was asked for. This is usually the point at which the developer can say they have completed the project and expect to get paid.
22
Review How might you use this with your coursework?
23
HW Complete homework on it’s learning for Testing.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.