Download presentation
Presentation is loading. Please wait.
1
16/27/2015 3:38 AM6/27/2015 3:38 AM6/27/2015 3:38 AMTesting and Debugging Testing The process of verifying the software performs to the specifications. The developer executes the program with a selected subset of all possible input, and compares the actual output with the expected output. Ideally planned during unit design and coding – will help with development.
2
26/27/2015 3:38 AM6/27/2015 3:38 AM6/27/2015 3:38 AMTesting and Debugging Debugging The process of fixing errors that are found in the software during testing. A software error is also called a “bug in the system” – from an incident in the early history of computers when a moth became stuck in a electrical switch in a computer causing it to malfunction.
3
36/27/2015 3:38 AM6/27/2015 3:38 AM6/27/2015 3:38 AMTesting and Debugging Development Life Cycle Unit Testing: testing the functionality of an individual program. System Testing: testing the system as a whole. Acceptance Testing: the users of the system try it to verify it performs as expected. Regression Testing: after changes are made to the system, it is retested to verify untouched functionality still performs properly.
4
46/27/2015 3:38 AM6/27/2015 3:38 AM6/27/2015 3:38 AMTesting and Debugging Black Box Testing “Black Box” is a concept from engineering. A device of some type has a specification for what it is to do and an interface. How it does it is unknown. Black box testing is testing what a program to verify it performs to the specification.
5
56/27/2015 3:38 AM6/27/2015 3:38 AM6/27/2015 3:38 AMTesting and Debugging White Box Testing Testing a device knowing how it is implemented internally. Clear Box Testing may be a better name because the tester can see the internals. White box testing is testing how the software implementation accomplishes its function.
6
66/27/2015 3:38 AM6/27/2015 3:38 AM6/27/2015 3:38 AMTesting and Debugging White Box Testing Many different theories and methods. Full testing: entering all possible inputs and verifying the output is correct – not feasible for all but the most trivial programs. A commonly accepted method: use input data that will execute all operations (lines of code) in the program at least once. This will also test all logic branches in the program. If the output from these tests is correct, the program is probably correct (but not guaranteed).
7
76/27/2015 3:38 AM6/27/2015 3:38 AM6/27/2015 3:38 AMTesting and Debugging Logic Control Structures If: both conditions should be tested (true and false) for each part of || operator. While: the loop should be executed zero, once, and more than once. Off-By-One Errors: conditions should be tested at the limit and just beyond the limit.
8
86/27/2015 3:38 AM6/27/2015 3:38 AM6/27/2015 3:38 AMTesting and Debugging Stubs & Drivers Stub: a null function to hold the place of the real function until the real function has been developed. Used to continue development without having to wait for the function to be developed. Used for system testing from the top down. Driver: a program to read in test data and call the function to be tested and then record the output of that function. The test data and the results can be saved to verify testing was done correctly. Also testing can be repeated easily as often as needed. Used for unit testing or function testing from the bottom up.
9
96/27/2015 3:38 AM6/27/2015 3:38 AM6/27/2015 3:38 AMTesting and Debugging Tools Diagnostic Outputs: lines of code added that output the values of selected variables at key points in the program to verify the program works the way it should (remove them for the final version of the program). Asserts: A line of code added that verifies selected conditions exist. A line of code added that verifies selected conditions exist. Format: assert( ); // #include Format: assert( ); // #include If condition is false when line executes, the program stops with an error. If condition is false when line executes, the program stops with an error. Debugger: a software tool (part of the IDE). It will display the code as it is executing. Variables can be displayed and the flow of control can be monitored. Profiler: a software tool. It will produce a printout of the code with either the run-time or the execution count next to each line.
10
106/27/2015 3:38 AM6/27/2015 3:38 AM6/27/2015 3:38 AMTesting and Debugging Engineering Desk Checking: visually examining (reading) the code to look for errors or ways to improve the program. Code Reviews: several peers desk check the program, then meet to discuss the results and any possible actions to be taken. Design Reviews: the unit or system design is desk checked by several peers to verify the design meets requirements.
11
116/27/2015 3:38 AM6/27/2015 3:38 AM6/27/2015 3:38 AMTesting and Debugging Reading Sections 5.9 & 6.5 cover these same concepts. Reviewing them may help clarify the material.
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.