Arunkumar Khannur's Software Testing Knowledge Center

4.2 Path Testing Basics

Structure of every program is a combination of sequential statements, control statements and loop constructs. This structural part of the program need to be tested in order check whether every statement and every branch in the program are executed at least once. In order to facilitate this type of structural testing, path testing family of techniques have been proposed and are being in use from more than two decades.

Path testing technique is a family of structural testing techniques. The very basis for path testing is to select a set of test paths through the program and providing appropriate inputs so as to execute every source statement and branch at least once in that program. Based on how many such test paths are executed successfully, one can measure test thoroughness.

Path testing techniques are basically dependent on the bug assumption which says that the program whose structural part is a combination of sequential statements, control statements and loop constructs while getting executed does not take intended path but instead take some other path because of some mistakes in structural constructs of that program. In addition, path testing is based on other assumptions like program specifications are correct and achievable; that there are no processing bugs but there can be control flow related bugs; and that data required for the program are properly defined and accessed.

Path testing is applicable to unit testing. It is effective for small and midsized programs. Programmers can use it to unit test their own code and also, for peer review of the code. One needs to have complete knowledge of the program structure in order to make effective path testing.
Khannur's Book
Arunkumar Khannur, Software Testing - Techniques and Applications, Published by Pearson Publications, 2011 (ISBN:978-81-317-5836-6; Pages:341 + xxii)
Follow Khannur
Khannur's Company
ISQT Process & Consulting Services Pvt. Ltd., Bangalore, INDIA
Khannur's Software Testing Forum
 Contact Khannur
ISQT Process & Consulting Services Pvt. Ltd.
#732, 1st Floor, 12th Main,
3rd Block, Rajajinagar,
Bangalore - 560010, INDIA
Phone: +91 80 23012511
Skype: arun.isqt