SD & D Testing
-
Upload
forrester-high-school -
Category
Education
-
view
709 -
download
1
Transcript of SD & D Testing
![Page 1: SD & D Testing](https://reader036.fdocuments.net/reader036/viewer/2022081521/58745d101a28abd53e8ba527/html5/thumbnails/1.jpg)
Testing
![Page 2: SD & D Testing](https://reader036.fdocuments.net/reader036/viewer/2022081521/58745d101a28abd53e8ba527/html5/thumbnails/2.jpg)
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: SD & D Testing](https://reader036.fdocuments.net/reader036/viewer/2022081521/58745d101a28abd53e8ba527/html5/thumbnails/3.jpg)
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: SD & D Testing](https://reader036.fdocuments.net/reader036/viewer/2022081521/58745d101a28abd53e8ba527/html5/thumbnails/4.jpg)
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: SD & D Testing](https://reader036.fdocuments.net/reader036/viewer/2022081521/58745d101a28abd53e8ba527/html5/thumbnails/5.jpg)
Test Data Sets
Normal
Extreme
Exceptional
![Page 6: SD & D Testing](https://reader036.fdocuments.net/reader036/viewer/2022081521/58745d101a28abd53e8ba527/html5/thumbnails/6.jpg)
Test Data SetsNormal Data
A normal data set should be tested to show that the program works as expected.
![Page 7: SD & D Testing](https://reader036.fdocuments.net/reader036/viewer/2022081521/58745d101a28abd53e8ba527/html5/thumbnails/7.jpg)
Test Data SetsExtreme Data
Extreme data is used to test the boundary limits within a program.
![Page 8: SD & D Testing](https://reader036.fdocuments.net/reader036/viewer/2022081521/58745d101a28abd53e8ba527/html5/thumbnails/8.jpg)
Test Data SetsExceptional Data
Exceptional data is used to test that the program can properly handle unexpected inputs.
![Page 9: SD & D Testing](https://reader036.fdocuments.net/reader036/viewer/2022081521/58745d101a28abd53e8ba527/html5/thumbnails/9.jpg)
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: SD & D Testing](https://reader036.fdocuments.net/reader036/viewer/2022081521/58745d101a28abd53e8ba527/html5/thumbnails/10.jpg)
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: SD & D Testing](https://reader036.fdocuments.net/reader036/viewer/2022081521/58745d101a28abd53e8ba527/html5/thumbnails/11.jpg)
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: SD & D Testing](https://reader036.fdocuments.net/reader036/viewer/2022081521/58745d101a28abd53e8ba527/html5/thumbnails/12.jpg)
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: SD & D Testing](https://reader036.fdocuments.net/reader036/viewer/2022081521/58745d101a28abd53e8ba527/html5/thumbnails/13.jpg)
Syntax Errors
![Page 14: SD & D Testing](https://reader036.fdocuments.net/reader036/viewer/2022081521/58745d101a28abd53e8ba527/html5/thumbnails/14.jpg)
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: SD & D Testing](https://reader036.fdocuments.net/reader036/viewer/2022081521/58745d101a28abd53e8ba527/html5/thumbnails/15.jpg)
Run-time (execution) Errors
![Page 16: SD & D Testing](https://reader036.fdocuments.net/reader036/viewer/2022081521/58745d101a28abd53e8ba527/html5/thumbnails/16.jpg)
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: SD & D Testing](https://reader036.fdocuments.net/reader036/viewer/2022081521/58745d101a28abd53e8ba527/html5/thumbnails/17.jpg)
Logic Errors
![Page 18: SD & D Testing](https://reader036.fdocuments.net/reader036/viewer/2022081521/58745d101a28abd53e8ba527/html5/thumbnails/18.jpg)
Testing TechniquesDry Runs
Trace Tables
Breakpoints
![Page 19: SD & D Testing](https://reader036.fdocuments.net/reader036/viewer/2022081521/58745d101a28abd53e8ba527/html5/thumbnails/19.jpg)
Dry RunsStepping through each line of the program
code, manually working out on the values of variables in a table
The tester/developer works as the computer
![Page 20: SD & D Testing](https://reader036.fdocuments.net/reader036/viewer/2022081521/58745d101a28abd53e8ba527/html5/thumbnails/20.jpg)
Trace TableA trace table is used to store the current
value of each variable as the programmer steps through the dry run program line by line
![Page 21: SD & D Testing](https://reader036.fdocuments.net/reader036/viewer/2022081521/58745d101a28abd53e8ba527/html5/thumbnails/21.jpg)
Trace TableSET savings TO 60SET pocket_money TO 10REPEAT WITH month FROM 1 to 4
SET savings TO savings + pocket_moneyEND REPEAT
![Page 22: SD & D Testing](https://reader036.fdocuments.net/reader036/viewer/2022081521/58745d101a28abd53e8ba527/html5/thumbnails/22.jpg)
Trace TableSET savings TO 60SET pocket_money TO 10REPEAT WITH month FROM 1 to 4
SET savings TO savings + pocket_moneyEND REPEAT
![Page 23: SD & D Testing](https://reader036.fdocuments.net/reader036/viewer/2022081521/58745d101a28abd53e8ba527/html5/thumbnails/23.jpg)
Trace TableSET savings TO 60SET pocket_money TO 10REPEAT WITH month FROM 1 to 4
SET savings TO savings + pocket_moneyEND REPEAT
![Page 24: SD & D Testing](https://reader036.fdocuments.net/reader036/viewer/2022081521/58745d101a28abd53e8ba527/html5/thumbnails/24.jpg)
Trace TableSET savings TO 60SET pocket_money TO 10REPEAT WITH month FROM 1 to 4
SET savings TO savings + pocket_moneyEND REPEAT
![Page 25: SD & D Testing](https://reader036.fdocuments.net/reader036/viewer/2022081521/58745d101a28abd53e8ba527/html5/thumbnails/25.jpg)
Trace TableSET savings TO 60SET pocket_money TO 10REPEAT WITH month FROM 1 to 4
SET savings TO savings + pocket_moneyEND REPEAT
![Page 26: SD & D Testing](https://reader036.fdocuments.net/reader036/viewer/2022081521/58745d101a28abd53e8ba527/html5/thumbnails/26.jpg)
Trace TableSET savings TO 60SET pocket_money TO 10REPEAT WITH month FROM 1 to 4
SET savings TO savings + pocket_moneyEND REPEAT
![Page 27: SD & D Testing](https://reader036.fdocuments.net/reader036/viewer/2022081521/58745d101a28abd53e8ba527/html5/thumbnails/27.jpg)
BreakpointsA breakpoint is used to stop a program at a
particular line of code
The programmer can then examine the value of variables at this point
Can also then step through subsequent lines of code one at a time
![Page 28: SD & D Testing](https://reader036.fdocuments.net/reader036/viewer/2022081521/58745d101a28abd53e8ba527/html5/thumbnails/28.jpg)
BreakpointsIn this example, a breakpoint has been added to test whether or not the code within the IF statement is actually run
We can see it has. We can also check the state of variables
![Page 29: SD & D Testing](https://reader036.fdocuments.net/reader036/viewer/2022081521/58745d101a28abd53e8ba527/html5/thumbnails/29.jpg)
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.