Sie sind auf Seite 1von 8

SOFTWARE QUALITY

ASSURANCE
WHITE BOX

Seminar: Oana FEIDI


Quality Manager Continental Automotive

White Box (Structural


Testing)

Structural - test case selection is based on an


analysis of the internal structure of
component

Control flow
Statement testing
Branch/Decision Testing
Branch Condition Testing
Modified Condition Combination Testing

Data flow testing

White Box

Using the white-box testing techniques


outlined in this seminar, a software
engineer can design test cases that
exercise

independent paths within a module or

unit;
exercise logical decisions on both their true and
false side;
execute loops at their boundaries and within
their operational bounds
exercise internal data structures to ensure their
validity

Statement testing

uses a model of the programs control flow

it is designed in order to execute all or selected statements of


the test object

Test cases are design to execute


each statement.
For each test case specify:
the input(s) of the component

An entity in a programming
language which is typically
the smallest indivisible unit of
execution.

identification of statement(s) to be
executed by the test case
the expected outcome of the test
case
Test completeness criteria: the percentage of the statements in the
software which were executed at least at once (executing a statement
means that the statement was encountered and evaluated during testing).

Example
float foo (int a, int b, int c, int d, float e)
{
float e;
if (a == 0) {
return 0;
}
int x = 0;
if ((a==b) OR ((c == d) AND bug(a) )) {
x=1;
}
statement
e = 1/x;
return e;
}

Branch/Decision Testing

uses a model of the programs flow


it is designed in order to execute (each) outcome
of all or selected decision points in a test object

For each test specify:


the input(s) of the component
Identification of decision
outcome(s) to be executed by
the test case

an executable statement
which may transfer control
to another statement,
depending upon the logic
of the decision statement

the expected outcome of the


test case
Test completeness criteria: achievement of the test coverage 100%
of the branches (one true and one false for each part of condition)

Example

A = true and (B or C) = false


A = false and (B or C) = true

if A and (B or C)

Case

Output

Branch Condition
Combination

uses a model of the program flow where each


combination of the inputs for a decision/condition must
be tested, in order to check if each branch is covered
For each test case specify:

the input(s) of the component


the expected outcome of the test case which can show which
branch is covered

Test completeness criteria: for a condition containing n


boolean operands 2n test cases are required to
achieve 100% coverage
Note: this coverage rapidly becomes unachievable for
more complex conditions.

Das könnte Ihnen auch gefallen