Subscribe by Email


Showing posts with label Anomaly. Show all posts
Showing posts with label Anomaly. Show all posts

Tuesday, May 15, 2012

How does a definition use association play a role in data flow testing?


Definition use association is one of the terms that appear at the scene of data flow testing and quite many of us are unaware of it. This article is all about the concepts of the definition use associations and what role does they have got to play in the data flow testing. 
The definition use association forms quite an important part of the data flow testing. Let us see how! 
First we are going to discuss some concepts of the data flow testing in regard with the definition use associations and then we will discuss the role of the definition use associations in the data flow testing. 

About Data Flow Testing


- A control flow graph is an important tool that is used by the data flow testing so that the anomalies related to the data can be explored. 
- A proper path selection strategy is what that is required for detection of such anomalies. 
- The path strategy which is to be used can be decided on the basis of the data flow anomalies discovered earlier. 
- Data flow testing is nothing but a family of path testing strategies through the control of a software program or application. 
- The path testing is required so that the sequence of possible events associated with the objects’ status can be explored.
- It is necessary that you keep the number of paths sufficient and sensible so that no object is left without initialization and without being used at least once in its life time without carrying out unnecessary testing. 
Data flow testing is comprised of two types of anomaly detection namely:
1. Static analysis: It is carried out on the program code without its actual execution. It involves finding syntax errors.
2. Dynamic analysis: It is carried out on a program while it is in a state of execution. It involves finding the logical errors.
- The data objects have been categorized in to several categories so as to make data flow testing much easy:
  1. Defined, created, initialized (d)
  2. Killed, undefined, released (k)
  3. Used (u): in calculations (c)
  4. In predicates (p)

Anomalies discovered by the static analysis are meant to be handled by the compiler itself. But the static analysis and the dynamic analysis do not suffice altogether. A rigorous path testing is required. 

About Definition Use Associations


- The definition use associations or the “du segments” are the path segments whose last links have a use of variable X and are simple and definition clear. 
- Typically  a definition use association is a combination of triple elements (x, d, u) where:
  1. X is the variable
  2. D is the node consisting of a definition of variable x
  3. U is either a predicate node or a statement depending up on the case and consists of a use of x.
- A sub path from d to u is also included in the flow graph with no definition of variable x occurring in between the d and u. 
- Below mentioned are some examples of the def use associations:
  1. (x, 3, 4)
  2. (x, 1, 4)
  3. (y, 2, (4, t))
  4. (z, 2, (3, t)) etc.
- Some of the most common data flow testing strategies are:
  1. All uses (AU)
  2. All DU paths (ADUP) and many more.
- First advice for effective data flow testing would be to resolve all the data flow anomalies discovered above. 
- Carrying out data flow operations on the same variable and within the same routines can also reap you good results. 
- It is advisable to use defined types and strong typing wherever it is possible in the program. 


Wednesday, March 21, 2012

Data flow testing is a white box testing technique - Explain?

A program is said to be in active state whenever there is some data flow in the program. Without having the data flowing around the whole program, it would not have been possible for the software systems or application to do any thing.

Hence, we conclude that data flow is an extremely important aspect of any program since it is what that keeps a program going on. This data flow also needs to be tested like any other aspect of the software system or application and therefore, this whole article is dedicated to the cause of the data flow testing.

What is Data Flow Testing?

- Data flow testing technique has been categorized under the white box testing techniques since the tester needs to have an in depth knowledge of the whole software system or application.

- Data flow testing cannot be carried out without a control flow graph since without that graph the data flow testing won’t be able to explore any of the unreasonable or unexpected things i.e., anomalies that can influence the data of the software system or application.

- Taking these anomalies in to consideration, it helps in defining the strategies for the selection of the test paths that play a great role in filling up the gaps between the branch testing or statement testing and the complete path testing.

- Data flow testing implements a whole lot of testing strategies chosen in the above mentioned way for exploring the events regarding the use of the data that occurs in a sequential way.

- It is a way determining that whether or not every data object has been initialized before it used and whether or not all the data objects are used at least once during the execution of the program.

Classification of Data types
The data objects have been classified in to various types based up on their use:

- Defined, created and initialized data objects denoted by d.
- Killed, undefined and released data objects denoted by k.
- Used data objects in predicates, calculations etc, denoted by u.

Critical Elements for Data Flow Testing

- The critical elements for the data flow testing are the arrays and the pointers.

- These elements should not be under estimated since they may fail to include some DU pairs and also they should not be over estimated since then unfeasible test obligations might be introduced.

- The under estimation is preferable over the over estimation since over estimation is causes more expense to the organization.

- Data flow testing is also aimed at distinguishing between the important and not so important paths.

- During the data flow testing many a times pragmatic compromises are needed to make since there exist so many unpredictable properties and exponential blow up of the paths.

Anomaly Detection under Data Flow Testing

There are various types of anomaly detection that are carried under the data flow testing:

1. Static anomaly detection
This analysis is carried out on the source code of the software program without the actual execution.

2. Dynamic anomaly detection
This is just the opposite of the static testing i.e., it is carried out on a running program.

3. Anomaly detection via compilers
Such detection are possible due to the static analysis. Certain compilers like the optimizing compilers can even detect the dead variables. The static analysis itself is incapable of detecting the dead variables since they are unreachable and thus unsolvable in the general case.

Other factors:
There are several other factors that play a great role in the data flow testing and they are:
1. Data flow modelling based on control flow graph
2. Simple path segments
3. Loop free path segments
4. DU path segments
5. Def – use associations
6. Definition clear paths
7. Data flow testing strategies


Facebook activity