2. Introduction:
● White-box/Structure-based measures and its related
design techniques are described in BS7925-2
standard.
● A software testing technique whereby explicit
knowledge of the internal workings of the item
being tested are used to select the test data.
● White Box testing is based on specific knowledge
of the source code to define the test cases and to
examine outputs.
3. Definition:
● Testing based on an analysis of the internal
structure of the component or system.
● White Box testing is also known as Clear Box
testing, Glass Box testing, Transparent Box testing,
and Structure-Based testing.
● It can be applied at all levels of SDLC.
● Most of the defects are found in Unit, Component
& Integration levels is through White-box.
6. STATEMENT COVERAGE:
The percentage of executable statements that have
been exercised by a test suite.
Statement
Coverage = Number of statements exercised
Total number of statements
* 100%
7. STATEMENT COVERAGE EXAMPLE
READ (a)
IF a > 6 THEN
B = a
ENDIF
PRINT b
● Here in this example Statement coverage is
100%
Start
Read a
If
a>6
B = a
Print B
End if
Yes
N0
8. DECISION COVERAGE:
The percentage of decision outcomes that
have been exercised by a test suite.
100% decision coverage implies 100%
statement coverage.
●
Decision coverage =
Number of decision outcomes exercised
Total number of decision outcomes
* 100%
10. CONDITION COVERAGE:
●
In this white Box testing technique try to cover
100% condition coverage of the code, it means
while testing the every possible conditions in the
code is executed at least once.
11. MULTIPLE CONDITION COVERAGE:
●
In this type of testing we use to cover each every
point of the system to be execute once.
●
In the actual development process developers are
make use of the combination of techniques those
are suitable for there software application.
12. Advantages Disadvantages
● It helps in optimizing
the code.
● Extra lines of code
can be removed.
● Due to the tester's
knowledge about the
code, maximum
coverage is attained
during test scenario
writing.
● Costs expensive
method of testing.
● It is difficult to
maintain white box
testing as the use of
specialized tools like
code analyzers and
debugging tools are
required.
13. Differences:
Black Box Testing White Box Testing
1. Internal Workings of an
application are not required.
1. Knowledge of the Internal
workings is must.
2. Also known as closed
box/data driven testing.
2. Also known as clear box
/structural testing.
3. End users,testers and
developers.
3. Normally done by testers
and developers
4. This can only be done by
trial and error method.
4. Data domains and Internal
boundaries can be better
tested