Subscribe by Email

Tuesday, April 24, 2012

What are different data flow testing strategies?

Data flow testing is quite important since you do not want any unreasonable things happen to your data objects which in turn can deviate the whole control flow of your program from the right track. To make a sensible data flow testing you need to use sensible and reliable data flow testing strategies.

This article is all about such data flow testing strategies. 
There are two types of machines that are used by the data flow as mentioned below:

  1. Von Neumann machine architecture
  2. Multi- instruction, multi- data machines architecture (MIMD)
- Before carrying out the data flow testing, it is good to assume a bug which causes problem in the control flow of the program. 
- It is not compulsory to use the typical data flow graphs, annotated ordinary control graphs can also be used for guiding the data flow testing process. 
- Data flow graph depicts all the directed links and nodes involved in the data flow.
- All the strategies for data flow testing that we are going to discuss are structural in nature and also focus up on the actions taking place on the data objects rather then just focussing on the connectivity of the software program.

Requirements of Data flow testing Strategy
- Data flow link weights are the first requirement of any data flow testing strategy. 
- All these strategies are based up on the selection of the path segments that very well satisfy at least few of the data flow characteristics common to all the data objects. 
- A data flow testing strategy is weaker than another strategy Y if all the test cases present in Y are not included in the X. Then Y is said to be a stronger strategy. 

Important Terminologies
Let us take a look at some important terminologies before moving on to the strategies:
  1. Definition clear path segment: It is a path defined with respect to a variable X that consists of various links such that the X is defined only on the first link.
  2. Simple path segment: In such a path one of the two nodes are visited twice.
  3. Loop free path segment: This path is contrary to the simple path segment in the way that in this path every node is visited once for the maximum.
  4. Du path segment: It is a path that is simple and definition clear since its last link consists of a computational use of variable X.
Different Strategies for Data Flow Testing
Below described are the different strategies for the data flow testing:

  1. ADUP or all DU paths: This strategy is considered to be the strongest among all the data flow testing strategies. It takes in to account all the du paths that occur in the definitions of all the variables to their every use. This strategy is a strong data flow testing criteria also. Another advantage of this strategy is that one of its tests can satisfy many definitions at a time.
  2. AU or all uses strategy: Under this strategy at least one of the definition clear paths from all the definitions of a variable has to be tested or exercised under a test. The task or burden of testing is actually reduced here i.e., the path coverage is cut down to branch coverage.
  3. APU + C or all p uses/ some c uses strategy: This strategy covers up at least one definition free path to every predicate use for every definition of the function. If this is not able to over up all the definitions of the variable, then it is recommended that computational use test cases are exercised.
  4. ACU + P or all c uses/ some p uses strategy: This strategy is just the opposite of the above strategy.
  5. AD or all definitions strategy: It covers only the definition of the variable. 

No comments:

Facebook activity