What is a feasible path in software testing?
A feasible path is a path that is executable if a valid combination of inputs causes the program to take that path.
Feasible path analysis
White-box testing can be used to analyze feasible paths. White-box testing uses internal code to generate test cases to fulfill one or more of the following:
- Statement coverage: Each statement of the program should be executed.
- Decision coverage: Every decision should be evaluated as true or false.
- Condition coverage: All the different possible outcomes of decisions should be achieved through combinations of different inputs for the sub-conditions.
- Path coverage: All the control flow paths of the program should be tested.
Infeasible path
An infeasible path in software testing is a path that is impossible to achieve with any set of inputs.
Cons of an infeasible path
- Infeasible paths consume time and money in the testing process.
- Infeasible paths are present obstacles for automated testing.
- Infeasible paths can produce deadlocks and be a bottleneck in the testing process.
- Infeasible paths present problems for white-box testing because they use the program’s code and structure to create test cases and then execute them.
Examples of feasible and infeasible paths
The following lines of code present examples of the feasible and infeasible paths.
- If the input is less than 50, the path followed will be A, B, C E, G. The path A, B, C, E, G is feasible.
- If the input is more than 50 but less than 90, the path followed will be A, B, D, E, G. The path A, B, D, E, G is feasible.
- If the input is more than 90, the path followed will be A, B, D, E, F, G. The path A, B, D, E, F, G is feasible.
However, the path A, B, C, E, F, G cannot be executed under any circumstances because F cannot execute if C executes. The path A, B, C, E, F, G is infeasible.
A: marks(input)
B: if marks < 50
C: then b = 2
D: else c = 3
E: if marks > 90
F: then d = 4
G: End
Free Resources
Copyright ©2025 Educative, Inc. All rights reserved