Presentation is loading. Please wait.

Presentation is loading. Please wait.

Testing Methods Carl Smith National Certificate Year 2 – Unit 4.

Similar presentations


Presentation on theme: "Testing Methods Carl Smith National Certificate Year 2 – Unit 4."— Presentation transcript:

1 Testing Methods Carl Smith National Certificate Year 2 – Unit 4

2 Unit 4 objectives Apply simple analysis and design techniques to the software development process. Develop basic high-level code using an appropriate procedural programming language. Use suitable testing methods to ascertain the correctness of a working piece of code. Produce appropriate documentation for a given program application.

3 Errors in your code What are the types of errors we need to test for?

4 Syntax Errors Syntax Errors: errors in the use of the Pascal language. The most common examples are missing semicolons and misspelled words. These errors are detected by the compiler and an error message is produced.

5 Runtime Errors Runtime Errors: a program stops executing because a program statement, although syntactically correct, produces a meaningless or impossible result e.g. dividing by zero

6 Logic Errors Logic Errors: a program completes execution but the results expected are not correct. A calculation may have been coded incorrectly or the sequence of instructions may be incorrect The level of error checking provided by the compiler and the meaningfulness of error messages displayed vary depending on the implementation of the development environment (e.g. TP)

7 Detecting Errors The compiler will detect syntax errors. Execution of the program will terminate when a run-time error is present It is important that we have a strategy for detecting the existence of logic errors

8 Black Box Testing Also known as functional testing. A software testing technique whereby the internal workings of the item being tested are not known by the tester. For example, in a black box test on a software design the tester only knows the inputs and what the expected outcomes should be and not how the program arrives at those outputs. The tester does not ever examine the programming code and does not need any further knowledge of the program other than its specifications.softwarecode

9 Advantages & Disadvantages The advantages of this type of testing include: The test is unbiased because the designer and the tester are independent of each other. The tester does not need knowledge of any specific programming languages. The test is done from the point of view of the user, not the designer. Test cases can be designed as soon as the specifications are complete. The disadvantages of this type of testing include: The test can be redundant if the software designer has already run a test case. The test cases are difficult to design. Testing every possible input stream is unrealistic because it would take a inordinate amount of time; therefore, many program paths will go untested.

10 White Box Testing Also known as glass box, structural, clear box and open box testing. A software testing technique whereby explicit knowledge of the internal workings of the item being tested are used to select the test data. Unlike black box testing, white box testing uses specific knowledge of programming code to examine outputs. The test is accurate only if the tester knows what the program is supposed to do. He or she can then see if the program diverges from its intended goal. White box testing does not account for errors caused by omission, and all visible code must also be readable.softwareblack box testingcode For a complete software examination, both white box and black box tests are required.

11 The Test Plan A test plan may or may not form part of the technical specification, but one needs to be produced. It should be developed by a systems analyst with an overview of the entire system being produced (and certainly not by a programmer involved in the coding process)

12 The Test Plan - 2 Individual programmers will test their own programs as part of the development process. The test plan may provide for testing of individual programs, but should concentrate on testing how the various elements of the new system “co-operate” together. It must test the entire system.

13 Successful Testing Since the purpose of testing is to discover “bugs”, a test is termed successful if it uncovers an error, and is unsuccessful if the program behaves as it should. Try to “break” your program – don’t try to convince yourself it works. Involve others in your testing…!

14 Testing Stages Design your test strategy Record your test plan List the results

15 Example Test Plan Table here…

16 Summary We covered:- National Certificate Unit 4 objectives The importance of testing Syntax, Runtime and Logic errors Successful Testing Example Test Plan Any Questions?


Download ppt "Testing Methods Carl Smith National Certificate Year 2 – Unit 4."

Similar presentations


Ads by Google