Subscribe by Email


Showing posts with label Flow based. Show all posts
Showing posts with label Flow based. Show all posts

Monday, April 23, 2012

How does a loop free path segment play a role in data flow testing?


The loop free path segments form a very important terminology in the path of data flow testing. But many of us are not well familiar with the concept of loop free path segments and the role that they have got to play in the data flow testing or path testing. In this article we have tried to explain in the easiest way possible the concept of the loop free path and the role it plays in the data flow testing. 

Before taking up the topic of the loop free path segment and its role in data flow testing we shall discuss a little about the data flow testing. 

The control flow graph is the best tool that the data flow testing can use in exploring all the weird or unreasonable things that can affect the data objects. These weird and unreasonable things are nothing but the anomalies.

Till now nine types of anomalies have been defined as mentioned below:

  1. dd: harmless but suspicious
  2. dk: might be a bug
  3. du: a normal case
  4. kd: a normal situation
  5. kk: harmless but might be containing bugs
  6. ku: a bug or error
  7. ud: not a bug because of re- assignment
  8. uk: a normal situation
  9. uu: a normal situation
 - If these anomalies are taken in to consideration, one can develop very effective and reliable path selection strategies which can be then used in filling the gaps that are present in between the branch testing and the complete path testing. 
- The strategies that are followed for carrying out a data flow test are based up on the selection of the paths via the flow of control of the software system or application.
- These path selection strategies are quite useful when it comes to exploring the sequences of the events that are in a way related to the status of the data objects. 
- The paths are so selected that they cover up all the objects, i.e. they ensure the initialization of each and every data object before it is used in the program and also that they are used for a minimum of one time. 

Categories of Data Objects


- The data objects have been categorized in to three different categories for making the path selection process easier:
  1. Defined, created, initialized (d)
  2. Killed, undefined, released (k)
  3. Used:
(a)    In calculations (c)
(b)   In predicates (p)

- An object is said to be defined whenever it has an occurrence in a data declaration or is assigned with a new value or is dynamically allocated. 
- On the other hand an object is said to be used whenever it becomes a part of a predicate or a calculation. - The anomaly detection process relies heavily on the following two anomaly detection techniques:
  1. Static anomaly detection (responsible for syntax errors) and
  2. Dynamic anomaly detection (responsible for logical errors).

What are Loop Free Path Segments


- Now coming to the loop free path segments, this is a terminology that is usually used under the context of the data flow modelling. 
- Loop free path segments are discovered using the control flow graph.
- The loop free path segments are basically a derivative of the simple path segments.
- It depends on the simple path segment that whether or not it is a loop free path segment also. 
- If the simple path segment consisting of two nodes A and B is having loop in both the nodes, then it cannot be called as a loop free path. 
- Loop free paths are the simple paths segments consisting of loop only in one of the either nodes.


Thursday, July 28, 2011

Basis Path Testing - A white Box testing technique.

Basis Path Testing uses the algorithmic flow of the program to design tests. Test cases that are written to test the basis set execute every statement in the program at least once.

- A flow graph should be drawn only when the logical structure of a component is complex. The flow graph allows you to trace program paths more readily. When compound conditions are encountered in a procedural design, the generation of a flow graph becomes slightly more complicated.

- Independent program path is a path which has at least one new set of processing statements or a new condition. An independent path should move along one edge that has not been traversed before. To know how many paths to look for, cyclomatic complexity is a useful metric for predicting those modules that are likely to be error prone. It can be used for test planning as well as test case design. Cyclomatic complexity provides the upper bound on the number of test cases that will be required to guarantee that every statement in the program has been executed at least one time.

- There are few steps to derive test cases or the basis set.
A flow graph is drawn using the design or code.
The cyclomatic complexity of flow graph is evaluated.
A basis set of linear independent path is determined.
Test cases are prepared forcing the execution of each path in basis set.

- Graph matrix is a square matrix whose size is equal to the number of nodes on flow graph. It is a tabular representation of a flow graph. Adding link weight to the each matrix entry, graph matrix can become a powerful tool to evaluate program control structure during testing.


Sunday, July 17, 2011

What are different elements of the analysis model?

Analysis model provides description of required information, functional and behavioral domains of computer based systems. There is a set of generic elements that is common to most analysis models:

- Scenario based elements are the first part of the analysis model that is developed. They serve as input for creation of other modeling elements. In another method for scenario based modeling, if we use functions or activities that would have been defined when the requirements elicitation was being done. These functions are a part of the processing context. When you have the analysis model, you would have defined a sequence of activities and these activities in turn describe the processing within a limited context. As stated earlier in previous post, when you take the analysis model, activities can be described at multiple levels of abstraction.

- In class based elements, a usage scenario has a set of objects which are categorized into classes which is a collection of things that have similar attributes and common behavior.

- In behavioral elements, the behavior of a system effects the chosen design and implementation approach that is applied. A state is an externally observable mode of behavior. State diagrams represents behavior of system depicting states and events that cause system to change state.

- In flow oriented elements, information flows through a computer based system. System accepts input,transform them using functions and produces output.


Facebook activity