Presentation is loading. Please wait.

Presentation is loading. Please wait.

Objectives Understand the basic concepts and definitions relating to testing, like error, fault, failure, test case, test suite, test harness. Understand.

Similar presentations


Presentation on theme: "Objectives Understand the basic concepts and definitions relating to testing, like error, fault, failure, test case, test suite, test harness. Understand."— Presentation transcript:

1 Objectives Understand the basic concepts and definitions relating to testing, like error, fault, failure, test case, test suite, test harness. Understand the basic concepts and definitions relating to testing, like error, fault, failure, test case, test suite, test harness. Explore the testing process—how testing is planned and how testing of a unit is done. Explore the testing process—how testing is planned and how testing of a unit is done. Understand the two main testing approaches black-box and whit-box testing. Understand the two main testing approaches black-box and whit-box testing.

2 Software Testing The main objective of testing is to eliminate defects that resulted from the implementation stage as a part of ensuring the quality of the final product. The main objective of testing is to eliminate defects that resulted from the implementation stage as a part of ensuring the quality of the final product. The process of executing a program with the intent of finding errors. The process of executing a program with the intent of finding errors. Two approaches for identifying defects in code: Two approaches for identifying defects in code: Static: through code inspection or analyzing tools.Static: through code inspection or analyzing tools. Dynamic: by executing the code and examine potential outputs.Dynamic: by executing the code and examine potential outputs.

3 Testing Concepts Errors: a measure of the difference between the actual and the ideal outputs. Errors: a measure of the difference between the actual and the ideal outputs. Fault: is a condition that causes a system to fail in performing its required function. Fault: is a condition that causes a system to fail in performing its required function. Commonly known as bug Commonly known as bug Failure: is the inability of a system or component to perform a required function according to its specifications. Failure: is the inability of a system or component to perform a required function according to its specifications. Resulted behavior != expected behavior. Resulted behavior != expected behavior.

4 Testing Concepts Test case: can be considered as comprising a set of test inputs and execution conditions, which are designed to exercise the system under testing in a particular manner. Test case: can be considered as comprising a set of test inputs and execution conditions, which are designed to exercise the system under testing in a particular manner. Test suite: A group of related test cases that are generally executed together to test some specific behavior or aspect of a system. Test suite: A group of related test cases that are generally executed together to test some specific behavior or aspect of a system.

5 Testing Concepts The intent of Testing The intent of Testing Test to identify defectsTest to identify defects Input wrong values! Input wrong values! Test to prove workingTest to prove working Input correct values! Input correct values! Levels of Testing Levels of Testing Unit testing Unit testing verification of the code produced by individual programmers Integration testing Integration testing System testing System testing Acceptance testing Acceptance testing Regression testing – after modification! Regression testing – after modification!

6 Testing Concepts

7 Testing Process Composed of : Composed of : Test PlanTest Plan Test case DesignTest case Design Test case ExecutionTest case Execution Test Plan: is a general document for the entire project that defines the scope, approach to be taken, and the schedule of testing, as well as identifies the test items for testing and the personnel responsible for the different activities of testing. Test Plan: is a general document for the entire project that defines the scope, approach to be taken, and the schedule of testing, as well as identifies the test items for testing and the personnel responsible for the different activities of testing. Test Plan includes description of how the testing for the project will proceed, which units will be tested, and what approaches (and tools) are to be used during the various stages of testing. Test Plan includes description of how the testing for the project will proceed, which units will be tested, and what approaches (and tools) are to be used during the various stages of testing. Input to test plan : Input to test plan : Project plan, Req document, Design document.Project plan, Req document, Design document.

8 Testing Process Test Case Design Test Case Design Test case design is a major activity in the testing process. Careful selection of test cases that satisfy the criterion and approach specified is essential for proper testing.Test case design is a major activity in the testing process. Careful selection of test cases that satisfy the criterion and approach specified is essential for proper testing.

9 Testing Process Test Case Execution: During this test defects are found and logged. Defects detector maybe different that their fixer. Any launched system must have their defects closed.

10 Testing Approaches Black-box testing: Black-box testing: The internal structure is not considered.The internal structure is not considered. White-box testing White-box testing The internal structure are examined carefully.The internal structure are examined carefully.

11 Testing Approaches Black-box testing techniques: Black-box testing techniques: Partition inputs into classes and test one from each class.Partition inputs into classes and test one from each class. Boundary valuesBoundary values E.g. From 0.0 to 1.0. E.g. From 0.0 to 1.0. Special casesSpecial cases E.g. divide by zero. E.g. divide by zero. State-based testingState-based testing Consider inputs + previous state of system Consider inputs + previous state of system

12 Testing Approaches White-box testing techniques: White-box testing techniques: Control Flow-Based CriteriaControl Flow-Based Criteria When a block starts execution and when it passes control to other blocks When a block starts execution and when it passes control to other blocks A node corresponding to a block whose first statement is the start statement of P is called the start node of G, and a node corresponding to a block whose last statement is an exit statement is called an exit node A node corresponding to a block whose first statement is the start statement of P is called the start node of G, and a node corresponding to a block whose last statement is an exit statement is called an exit node

13 Example Check values between 0 - 100 Compute the absolute value of a number

14 Key points Testing is a way to identify defects in a system. Testing is a way to identify defects in a system. The intention of testing depends on the view of the tester. The intention of testing depends on the view of the tester. Black-box and white-box are two main approaches to testing. Black-box and white-box are two main approaches to testing.


Download ppt "Objectives Understand the basic concepts and definitions relating to testing, like error, fault, failure, test case, test suite, test harness. Understand."

Similar presentations


Ads by Google