Whenever
you would have came across the topic of data flow testing, you surely would
have heard about the term “du path segment” but still not familiar with it!
This article if focussed up on the du path segments and what role it has got to
play in the data flow testing.
We will discuss the du path segments under the
context of data flow testing and not as a separate topic so that it becomes
easy for you to understand.
The whole process of data flow testing is guided by
a control flow graph that apart from just guiding the testing process also
helps in rooting out the anomalies present in the data flow. With all the
anomalies being already discovered one can now design better path selection
strategies taking in to consideration these data flow anomalies.
There are nine
possible anomalies combinations as mentioned below:
- dd: harmless but suspicious
- dk: might be a bug
- du: a normal case
- kd: a normal situation
- kk: harmless but might be containing bugs
- ku: a bug or error
- ud: not a bug because of re- assignment
- uk: a normal situation
- uu: a normal situation
For data flow testing some data object states and usage have
been defined as mentioned below:
1.
Defined,
initialized, created à d
2.
Killed,
undefined, unreleased àk
3.
Used
for:
(a)
Calculations
à c
(b)
Predictions
à p
Terminology associated with Data Flow Testing
Almost all the strategies that are implemented for the data flow testing are
structural in nature. There are certain terminologies associated with the data
flow testing as stated below:
- Definition clear path segment
- Loop free path segment
- Simple path segment and lastly
- Du path
What is a DU path Segment?
- DU path segment can be defined as a path segment which is simple and definition clear if and only if the last link or node of the path has a use of the variable x.
Let us take an example to make the concept of du path segment clearer.
- Suppose a du path for a variable X exists between two nodes namely A and B such that the last link between the two nodes consists of a computational use of the variable X.
- This path is definition clear and simple.
- If there exists a node C at the last but one position that is the path is having a predicate use and the path from the node A to node C is definition clear and does not contain any loop.
- Several strategies have been defined for carrying out the data flow testing like:
- ADUP or all du paths strategy
- AU or all uses strategy
- APU+ C or all p uses/ some c uses strategy
- ACU +P or all c uses/ some p uses strategy
- AD or all definitions strategy
- APU or all predicate uses strategy
- ACU or all computational uses strategy
Strategy for DU Path Strategy
We shall describe in detail here only the ADUP or all du paths strategy.
- This strategy is considered to be one of the most reliable and strongest data flow testing strategy.
- It involves the use or exercising of all the du paths included in the definition of the variables that have defined to every use of the definition.
- All the du paths suppose to be a strong criterion for testing but it does not involve as many tests as it seems.
- Simultaneously many criterion are satisfied by one test for several definitions and uses of the variables.
No comments:
Post a Comment