Basis Path Testing

Basis path testing is a white box testing approach applied by QA Valley to design and execute all the test cases that represent the full complement of independent program execution paths that can occur in a software product.

The Basis Path Testing mechanism was devised by Thomas McCabe in 1970 to define test cases based on the logical path or flows that can be taken through the program. The main objective of Basis Path Testing is to evaluate all possible blocks in a program to achieve maximum path coverage. In Basis Path Testing technique, testers at QA Valley first make control flow graphs from source code or flowchart and then calculate the Cyclomatic Complexity, which is a type of software metrics used to determine the number of independent paths.

At QA Valley, our testing team performs Basis Path Testing method in four steps – (a) To compute the program graph, (b) To calculate the Cyclomatic Complexity metrics, (c) To find a basis set of linearly independent paths, and (d) To generate test cases for each of these paths. Many tools such as devMetrics, GMetrics, Reflector Add-In, NDepends, and OCLint are used by our expert testers to find the Cyclomatic Complexity of a program. The metrics for C and C++ programs are found using OCLint and devMetrics tools respectfully. GMetrics and NDepends tools are used to find metrics in Java programs. Reflector Add-In tool is useful for .Net Assemblies.

We ensure that every possible path of all programs of the application has been tested and executed at least once. As our testers focus attention on program logic, Basis Path Testing helps you to determine all faults lying within a piece of the software code. As Basis Path Testing is a type of White Box Testing, its major benefits are Introspection, Stability, and Thoroughness. In short, Basis Path Testing is used to maximize test coverage and reduce the number of redundant tests. The aim of this technique is to design the minimum number of test cases for each independent path.