1 / 13

Testing

Testing. Lecture 7 HNC – Programming Concepts. 1. Aims. To understand the purpose of testing To explore the four types of test data Have a understanding of Test plans and Test logs To have an understanding of Syntax and Semantic errors. 2. Testing - Purpose.

Télécharger la présentation

Testing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Testing Lecture 7 HNC – Programming Concepts 1

  2. Aims • To understand the purpose of testing • To explore the four types of test data • Have a understanding of Test plans and Test logs • To have an understanding of Syntax and Semantic errors 2

  3. Testing - Purpose • The purpose of testing is not to demonstrate how solid your code is, it is to find the bugs. • Testing is an art. No method always works, you must think about what the user may do, not what you would do. 3

  4. Testing – What should be tested? • If a program is long then you can’t test all the possible routes through it (even something that is safety critical such as the flight control software of the Airbus was not fully tested). 4

  5. Testing – What should be tested?TEST DATA • There are four different conditions that testers use to test programs, these are: • Normal – valid data that the program should handle correctly • Extreme – also valid data, but at the limit in terms of size/ range (tests the boundaries) • Erroneous – totally invalid data i.e. text into a numeric field • Wrong – invalid data that is clearly incorrect 5

  6. Test Plan • A test plan is used to provide a basis for specifying tests that are to be carried out during the development of a program. • A test plan if carried out correctly provides valuable evidence that the system (or sub systems) performs as it should. • A test plan should contain normal, extreme, erroneous and wrong test data. 6

  7. What does a Test plan consist of? 7

  8. Test log • A test log is used to prove that all the tests carried out in the test plan were carried out. Below shows an example of a test that would be shown in the test log. Test number 1 (this refers to the test No in the test plan) 8

  9. Syntax Errors • These types of errors are very common especially with new developers. • A syntax error occurs when the developer has incorrectly written code (broken the syntax rules of the programming language) • An example of this in English would be: Why did the the chicken cross the road? 9

  10. Syntax Errors – Continued Can you spot the two syntax errors! 10

  11. Semantic error • Semantic errors include technically correct code, but fundamental problems with the meaning of the code. • Semantic errors are detected usually at runtime, normally when the program does not output what you expected it to. • An example of this in English would be: This sentence is excellent Italian. 11

  12. Semantic Errors – Continued Can you spot the semantic Error below? 12

  13. Conclusion • We have covered the following aims • To understand the purpose of testing • To explore the four types of test data • Have a understanding of Test plans and Test logs • To have an understanding of Syntax and Semantic errors 13

More Related