Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

SD & D Testing

988 views

Published on

Higher Computing Science
Testing

Published in: Education
  • D0WNL0AD FULL ▶ ▶ ▶ ▶ http://1lite.top/T3nVy ◀ ◀ ◀ ◀
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

SD & D Testing

  1. 1. Testing
  2. 2. Testing Testing 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
  3. 3. Testing The purpose of testing is to to identify errors to ensure that software is fit for purpose to ensure that code is efficient to ensure that code is maintainable
  4. 4. Test plan Selecting 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)
  5. 5. Test Data Sets Normal Extreme Exceptional
  6. 6. Test Data Sets Normal Data A normal data set should be tested to show that the program works as expected.
  7. 7. Test Data Sets Extreme Data Extreme data is used to test the boundary limits within a program.
  8. 8. Test Data Sets Exceptional Data Exceptional data is used to test that the program can properly handle unexpected inputs.
  9. 9. Comprehensive testing Software 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.
  10. 10. Phases of testing 1. Procedure / Module Testing Individual code procedures and modules tested 2. Integration Testing Test the modules work together 3. System Testing Test overall system 4. Acceptance Testing Customer tests program against their specification 5. Alpha and Beta Testing Put the software out to users to test
  11. 11. 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
  12. 12. Syntax Errors Syntax 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
  13. 13. Syntax Errors
  14. 14. Run-time (execution) Errors Run-time errors are those that appear when you run your code The syntax is correct, but the program fails to execute
  15. 15. Run-time (execution) Errors
  16. 16. Logic Errors Logic 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
  17. 17. Logic Errors
  18. 18. Testing Techniques Dry Runs Trace Tables Breakpoints
  19. 19. Dry Runs Stepping 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
  20. 20. Trace Table A trace table is used to store the current value of each variable as the programmer steps through the dry run program line by line
  21. 21. Trace Table SET savings TO 60 SET pocket_money TO 10 REPEAT WITH month FROM 1 to 4 SET savings TO savings + pocket_money END REPEAT
  22. 22. Trace Table SET savings TO 60 SET pocket_money TO 10 REPEAT WITH month FROM 1 to 4 SET savings TO savings + pocket_money END REPEAT
  23. 23. Trace Table SET savings TO 60 SET pocket_money TO 10 REPEAT WITH month FROM 1 to 4 SET savings TO savings + pocket_money END REPEAT
  24. 24. Trace Table SET savings TO 60 SET pocket_money TO 10 REPEAT WITH month FROM 1 to 4 SET savings TO savings + pocket_money END REPEAT
  25. 25. Trace Table SET savings TO 60 SET pocket_money TO 10 REPEAT WITH month FROM 1 to 4 SET savings TO savings + pocket_money END REPEAT
  26. 26. Trace Table SET savings TO 60 SET pocket_money TO 10 REPEAT WITH month FROM 1 to 4 SET savings TO savings + pocket_money END REPEAT
  27. 27. Breakpoints A 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
  28. 28. Breakpoints In 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
  29. 29. 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.

×