objectives understand the basic concepts and definitions relating to testing, like error, fault,...

14
Objectives 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. Understand the two main testing approaches black-box and whit-box testing.

Upload: sydney-garrison

Post on 27-Dec-2015

215 views

Category:

Documents


0 download

TRANSCRIPT

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

Objectives

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.

Understand the two main testing approaches black-box and whit-box testing.

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

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 process of executing a program with the intent of finding errors.

Two approaches for identifying defects in code:• Static: through code inspection or analyzing tools.• Dynamic: by executing the code and examine

potential outputs.

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

Testing Concepts

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.

Commonly known as bug

Failure: is the inability of a system or component to perform a required function according to its specifications.

Resulted behavior != expected behavior.

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

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 suite: A group of related test cases that are generally executed together to test some specific behavior or aspect of a system.

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

Testing Concepts

The intent of Testing• Test to identify defects

Input wrong values!• Test to prove working

Input correct values! Levels of Testing

Unit testing• verification of the code produced by individual programmers

Integration testing System testing Acceptance testing Regression testing – after modification!

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

Testing Concepts

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

Testing Process Composed of :

• Test Plan• Test case Design• Test 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 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 :• Project plan, Req document, Design document.

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

Testing Process

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.

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

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.

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

Testing Approaches

Black-box testing:• The internal structure is not considered.

White-box testing• The internal structure are examined carefully.

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

Testing Approaches

Black-box testing techniques:• Partition inputs into classes and test one from

each class.• Boundary values

E.g. From 0.0 to 1.0.

• Special cases E.g. divide by zero.

• State-based testing Consider inputs + previous state of system

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

Testing Approaches

White-box testing techniques:• Control Flow-Based Criteria

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

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

Example

Check values between 0 - 100

Compute the absolute value of a number

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

Key points

Testing is a way to identify defects in a system. The intention of testing depends on the view of

the tester. Black-box and white-box are two main

approaches to testing.