Software Testing - Feasible Path



Software testing is conducted with the help of the black box, white box, and gray box testing methodologies. While the black box testing is focussed on verifying the outputs obtained from various sets of input data, the white box testing validates the source code, algorithm, logic, and data flow. It also tests the statements, decisions, conditions, and paths of the code. Finally, the gray box testing works by incorporating the features of both the black, and the white box testing processes.

What is Feasible Path of a Software?

The feasible path is the one which is executable provided there are logical combinations of input data available that forces the program to choose that particular path. A program code consists of multiple paths. At the beginning of testing, all of them are targeted to be executed and validated at least once. But it is seen that some of these paths are infeasible, and cannot be executed by any data sets.

Analysis of Feasible Paths of a Software

The white box testing procedure is used to evaluate the feasible paths of a software code. The white box test cases are generated with the help of the the code to satisfy the validations listed below −

Statement Coverage

In this verification, the main focus is to touch all the statements, and nodes in the program source code at least once. It assists in identifying the faulty sections of the code.

Branch Coverage

In this verification, the main focus is to touch all the branches from all the decision points in the program source code at least once.

Condition Coverage

In this verification, the main focus is to touch every condition in the program source code.

Multiple Conditions Coverage

In this verification, the main focus is to touch all combinations of the probable outcomes of the conditions at least once in the program source code.

Path Coverage

In this verification, at first the control flow graphs are created followed by the measurement of the cyclomatic complexity of the program code. It identifies the minimum number of the tests that can be designed from each independent path in the program source code.

Loop Testing

In this verification, the main focus is to touch all loops to identify problems at their beginning and in the end.

Infeasible Path of a Software

The infeasible path is the one which is impossible to be executed, and verified by any combinations of inputs. Every source code contains multiple paths. At the start, every path is targeted to be executed and tested. But in some scenarios, it is observed that few of the paths are unworkable, and hence cannot be traversed at all. These are known as the infeasible paths.

Cons of Software Infeasible Paths

The cons of the software infeasible paths are listed below −

  • The software infeasible paths lead to wastage of time, effort, and money for the testers.
  • The software infeasible paths make the automation unproductive.
  • The software infeasible paths pose a lot of problems at the time of white box testing.

Example of Software Feasible and Infeasible Paths

Let us take an example of the below code snippet to determine the infeasible, and feasible paths of a software.

  • Place an order for a particular amount.
  • If the order amount is less than rupees five hundred.
  • Then no discount is awarded.
  • Else there is a twenty-five percent discount awarded.
  • If the order amount is greater than rupees thousand.
  • Then there is a thirty-five percent discount awarded.
  • End

By evaluating the above piece of code and its control flow graph, we can infer that the path namely, 1 → 2 → 3 → 5 → 6 → 7 points to an infeasible path because it is impossible to execute the node or statement 6. But, the paths namely, 1 → 2 → 4 → 5 → 6 → 7 and 1 → 2 → 4 → 5 → 7 are both accurate, and feasible.

Conclusion

This concludes our comprehensive take on the tutorial on Software Feasible Path. Weve started with describing what is the feasible path of a software, analysis of feasible paths of a software, what is an infeasible path of a software, what are the cons of software infeasible paths, and an example of software feasible and infeasible paths. This equips you with in-depth knowledge of Software Feasible Path. It is wise to keep practicing what youve learned and exploring others relevant to Software Testing to deepen your understanding and expand your horizons.

Advertisements