Path Testing
What is Path Testing?
Path testing is ideally a form of White box testing technique. It is a structural testing method which involves identifying a piece of code and executing it by exercising all possible executable paths through the code. This allows us to validate the software from all potential faults that are likely to occur paving a way to robust and error-free software.
For Example: If a program contains a simple IF…ELSE block, consider a scenario which executes both the IF and the ELSE Block.
How can we make use of Path Testing for Black Box Testing?
To begin with, make a note of all the possible paths that a scenario can be executed in. Ensure that your findings are represented in the form of a flow chart for a quick and clear way of recognizing the information being communicated. Use different options of the scenario while creating a flow chart to address how the software behaves in various situations.
Consider an example of uploading a XML file in a System.
Traditionally a test scenario would be as follows:
- Upload error data
- Upload valid data
By using the Path testing, these additional scenarios can be checked:
Points to remember while creating the flow chart:
- Start with shortest path
- Use each instruction/option at least once
- Try to create a detailed scenario using one instruction/option.
- Do not overlook the important paths
- Do not overlook sections which seem to be difficult to understand
Benefits of Path Testing
- Best possible way to find maximum number of faults within a given scenario during the initial stage of testing
- Maximum executable code coverage
- Verifying all corner cases that could have been missed with the traditional testing approach
- Creation of a flow chart with the findings data ensure a quick and clear way to increase efficiency of testing by making the steps in that process more visible