Computing Science Software Design and Development Testing and Documenting Solutions
Learning Objectives By the end of this topic you will be able to: • construct a test plan; • explain the difference between syntax, execution and logic errors; • understand how dry runs, trace tables, trace tools and breakpoints are used in the debugging process.
Test plans A test plan is a set of test data that will systematically and comprehensively test a piece of software It is used to ensure that the software meets the original specification The test plan should be created in the design stage
Test plans should include • • Original software specification Testing schedule Aspects to be tested The test data and expected resultssting
Types of errors • Syntax error - the "grammatical" rules of the language have been broken. It is normally detected spotted by a compiler or interpreter. • Logic error - the program runs but does not do what the programmer intended. • Execution error - the program crashes when it is run
Debugging methods • Dry run – a manual (pencil and paper) run through of the program, • Trace table – used in dry runs to keep a note of the values of variables as you go through the program • Breakpoints – setting a point in the code where it will stop and the value of variables can be examined • Trace tools – allows programmer to see what lines of code are being executed and what variables are changing