Path Testing in Software Engineering Last Updated : 30 Jan, 2024 Suggest changes Share Like Article Like Report Path Testing is a method that is used to design the test cases. In the path testing method, the control flow graph of a program is designed to find a set of linearly independent paths of execution. In this method, Cyclomatic Complexity is used to determine the number of linearly independent paths and then test cases are generated for each path. It gives complete branch coverage but achieves that without covering all possible paths of the control flow graph. McCabe's Cyclomatic Complexity is used in path testing. It is a structural testing method that uses the source code of a program to find every possible executable path. Path Testing ProcessPath Testing Control Flow Graph: Draw the corresponding control flow graph of the program in which all the executable paths are to be discovered.Cyclomatic Complexity: After the generation of the control flow graph, calculate the cyclomatic complexity of the program using the following formula.McCabe's Cyclomatic Complexity = E - N + 2P Where, E = Number of edges in the control flow graph N = Number of vertices in the control flow graph P = Program factor Make Set: Make a set of all the paths according to the control flow graph and calculate cyclomatic complexity. The cardinality of the set is equal to the calculated cyclomatic complexity.Create Test Cases: Create a test case for each path of the set obtained in the above step.Path Testing TechniquesControl Flow Graph: The program is converted into a control flow graph by representing the code into nodes and edges.Decision to Decision path: The control flow graph can be broken into various Decision to Decision paths and then collapsed into individual nodes.Independent paths: An Independent path is a path through a Decision to Decision path graph that cannot be reproduced from other paths by other methods.Advantages of Path TestingThe path testing method reduces the redundant tests.Path testing focuses on the logic of the programs.Path testing is used in test case design.Disadvantages of Path TestingA tester needs to have a good understanding of programming knowledge or code knowledge to execute the tests.The test case increases when the code complexity is increased.It will be difficult to create a test path if the application has a high complexity of code.Some test paths may skip some of the conditions in the code. It may not cover some conditions or scenarios if there is an error in the specific paths. P pp_pankaj Follow Article Tags : Software Engineering Software Testing Explore Software Engineering BasicsIntroduction to Software Engineering7 min readSoftware Development Life Cycle (SDLC)8 min readSoftware Quality - Software Engineering5 min readISO/IEC 9126 in Software Engineering4 min readBoehm's Software Quality Model4 min readSoftware Crisis - Software Engineering3 min readSoftware Measurement & MetricesSoftware Measurement and Metrics4 min readPeople Metrics and Process Metrics in Software Engineering7 min readHalsteadâs Software Metrics - Software Engineering10 min readCyclomatic Complexity6 min readFunctional Point (FP) Analysis - Software Engineering8 min readLines of Code (LOC) in Software Engineering4 min readSoftware Development Models & Agile MethodsWaterfall Model - Software Engineering12 min readWhat is Spiral Model in Software Engineering?9 min readPrototyping Model - Software Engineering7 min readIncremental Process Model - Software Engineering6 min readRapid Application Development Model (RAD) - Software Engineering9 min readCoupling and Cohesion - Software Engineering10 min readAgile Software Development - Software Engineering15+ min readSRS & SPMSoftware Requirement Specification (SRS) Format5 min readSoftware Engineering | Quality Characteristics of a good SRS7 min readSoftware Project Management (SPM) - Software Engineering8 min readCOCOMO Model - Software Engineering15+ min readCapability Maturity Model (CMM) - Software Engineering10 min readIntegrating Risk Management in SDLC | Set 18 min readSoftware Maintenance - Software Engineering13 min readTesting & DebuggingWhat is Software Testing?11 min readTypes of Software Testing15+ min readTesting Guidelines - Software Engineering3 min readWhat is Debugging in Software Engineering?11 min readVerification & ValidationVerification and Validation in Software Engineering6 min readRole of Verification and Validation (V&V) in SDLC5 min readRequirements Validation Techniques - Software Engineering8 min readPractice QuestionsTop 50+ Software Engineering Interview Questions and Answers1 min read My Profile ${profileImgHtml} My Profile Edit Profile My Courses Join Community Transactions Logout Like