Pages

Sunday, August 21, 2011

Test Design Techniques


Test Design Techniques
Important Terms:
The test development process
Test case specification, test design, test execution schedule, test procedure specification, test script, traceability.
Categories of test design techniques
Black-box test design technique, specification-based test design technique, white-box test design technique, structure-based test design technique, experience-based test design technique.
Specification-based or black box techniques
Boundary value analysis, decision table testing, equivalence partitioning, state transition testing, use case testing.
Structure-based or white box techniques
Code coverage, decision coverage, statement coverage, structure-based testing.

Experience-based techniques
Exploratory testing, fault attack.
Choosing test techniques
No specific terms.                                
Test Design Techniques
o      Specification-based/Black-box techniques
o       Structure-based/White-box techniques
o       Experience-based techniques

I) Specification-based/Black-box techniques
§  Equivalence partitioning
§  Boundary value analysis
§  Decision table testing
§  State transition testing
§  Use case testing
Equivalence partitioning
o      Inputs to the software or system are divided in to groups that are expected to exhibit similar behavior
o      Equivalence partitions or classes can be found for both valid data and invalid data
o      Partitions can also be identified for outputs, internal values, time related values and for interface values.
o      Equivalence partitioning is applicable all levels of testing

Boundary value analysis
o      Behavior at the edge of each equivalence partition is more likely to be incorrect. The maximum and minimum values of a partition are its boundary values.
o      A boundary value for a valid partition is a valid boundary value; the boundary of an invalid partition is an invalid boundary value.
o      Boundary value analysis can be applied at all test levels
o      It is relatively easy to apply and its defect-finding capability is high
o      This technique is often considered as an extension of equivalence partitioning.

Decision table testing
o      In Decision table testing test cases are designed to execute the combination of inputs
o      Decision tables are good way to capture system requirements that contain logical conditions.
o      The decision table contains triggering conditions, often combinations of true and false for all input conditions
o      It maybe applied to all situations when the action of the software depends on several logical decisions

State transition testing
o      In state transition testing test cases are designed to execute  valid and invalid state transitions
o      A system may exhibit a deferent response on current conditions or previous history. In this case, that aspect of the system can be shown as a state transition diagram.
o      State transition testing is much used in embedded software and technical automation.

Use case testing
o      In use case testing test cases are designed to execute user scenarios
o      A use case describes interactions between actors, including users and the system
o      Each use case has preconditions, which need to be met for a use case to work successfully.
o      A use case usually has a mainstream scenario and some times alternative branches.
o      Use cases, often referred  to as scenarios, are very useful for designing acceptance tests with customer/user participation   

II) Structure-based/White-box techniques
o    Statement testing and coverage
o    Decision testing and coverage
o    Other structure-based techniques
§ condition coverage
§ multi condition coverage
Statement testing and coverage:
Statement
An entity in a programming language, which is typically the smallest indivisible unit of execution

Statement coverage
The percentage of executable statements that have been exercised by a test suite

Statement testing
A white box test design technique in which test cases are designed to execute statements

Decision testing and coverage
Decision
A program point at which the control flow has two or more alternative routes

A node with two or more links to separate branches

Decision Coverage
The percentage of decision outcomes that have been exercised by a test suite

100% decision coverage implies both 100% branches coverage and 100% statement coverage

Decision testing
A white box test design technique in which test cases are designed to execute decision outcomes.

Other structure-based techniques
Condition
A logical expression that can be evaluated as true or false

Condition coverage
The percentage of condition outcomes that have been exercised by a test suite

Condition testing
A white box test design technique in which test cases are designed to execute condition outcomes

Multiple condition testing
A white box test design technique in which test cases are designed to execute combinations of single condition outcomes

III) Experience-based techniques
o    Error guessing
o    Exploratory testing

Error guessing
o    Error guessing is a commonly used experience-based technique

o    Generally testers anticipate defects based on experience, these defects list can be built based on experience, available defect data, and from common knowledge about why software fails.

Exploratory testing
o    Exploratory testing is concurrent test design, test execution, test logging and learning , based on  test charter containing test objectives and carried out within time boxes

It is approach that is most useful where there are few or inadequate specifications and serve time pressure.

No comments:

Post a Comment