Path Testing

Path Testing

In the field of software, the term 'Path' describes the flow of the process in a particular direction. It basically defines the route(s) of the process that starts from a particular node and ends at the destination node. A path through the program is the sequence, which begins at one junctions and terminates at another junction.

Let us define the concept of path, with the help of the given diagram. Suppose, a process initiates at node A and it will be terminated at node I. The path that may be taken by the process to finish reach its destination are





A→E→I, and many more

Further, the intermediate routes such as B to F, D to H, G to H, A to E, etc. are also comes under the terminology of 'path'.

What is meant by the path testing?

It simply refers to the checking of the paths, through which various processes, involved in the functioning of the software product or application, will be executed. Basically, it is a type of structural testing that works on the source code. It follows the program or process control flow or workflow, rather taking specifications as the base for carrying out the testing of the software product.

The main intent behind this type of testing is to ensure that all the possible paths has been covered and executed, at least once, through the software program.

How to do it?

First of all, before taking up the process of path testing, it is being assumed that

  • All the specifications are correct.
  • Data stored in the application, is properly organized, well defined and is accessible with the ease.
  • Absence of issues or defects other than those associated with the path.

After considering the given assumptions, the testing is carried out further through following approaches.

Control Flow Chart

Generally it, involves the activity of representing the work-flow of the process or program, in the form of control chart or graph, which consists of nodes, links, edges, regions, etc.

Decision to Decision (DD) path

This strategy involves selection of one, between the two decisions, for the purpose of path's execution. It is carried out, with the help of control flow chart and includes node, which inherits one of the following traits

  • Single node of in-degree=0 i.e. initial node.
  • Single node of out-degree=0 i.e. terminal node
  • Single node with in-degree and out-degree=1.
  • Single node with in-degree or out-degree > 2

Further, the maximum chain length in DD path > 1

Basis path testing

It is the widely used method that guarantees the complete branch coverage in the control flow graph. This method basically, involves the study and analysis of the control flow graph, which contributes towards the identification of the linearly independent paths. Thereafter, these identified paths are used to design and build test-cases.

Key Points

  • Ensure the execution of the each and every path, present in the software program, at least once.
  • It is basically a structured type of testing that uses control flow graph and is independent of the specifications. As such, present of defects, due to error in the specifications, cannot be traced out by the path testing
  • Besides, covering all the paths under the test, it is not guaranteed to explore all the defects, as there are many defects, which may arise due to certain reasons, such

    • Path followed by the process is not in order, which may result in to error in the software application. For example, a process is required to be executed, and the path to be followed by it should A→B→C. But it takes wrong path i.e. A→C→B.
    • Mistakes introduced by the developer in the source code, such as inadvertently, forgotten to add processing in the code(s), which may lead to no path, in the direction of executing the code.
  • Generally, the testers, with the use of their skills, are responsible for performing the path testing.
  • Effective for exploring large quantity of defects during unit testing.