0% found this document useful (0 votes)
158 views

What Is Path Testing?

Path testing executes all possible paths through a program to find faults. Basis path testing defines test cases based on logical paths through a program to maximize coverage with few tests. It draws a control graph, calculates complexity metrics to determine independent paths, generates a basis path set, and tests each path. This helps reduce redundancy and focuses on program logic. Basis path testing executes every statement at least once and helps determine faults within code.

Uploaded by

Shalni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
158 views

What Is Path Testing?

Path testing executes all possible paths through a program to find faults. Basis path testing defines test cases based on logical paths through a program to maximize coverage with few tests. It draws a control graph, calculates complexity metrics to determine independent paths, generates a basis path set, and tests each path. This helps reduce redundancy and focuses on program logic. Basis path testing executes every statement at least once and helps determine faults within code.

Uploaded by

Shalni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

What is Path Testing?

Path testing is a structural testing method that involves using the source code
of a program in order to find every possible executable path. It helps to
determine all faults lying within a piece of code. This method is designed to
execute all or selected path through a computer program.

Any software program includes, multiple entry and exit points. Testing each of
these points is a challenging as well as time-consuming. In order to reduce
the redundant tests and to achieve maximum test coverage, basis path testing
is used.

What is Basis Path Testing?


The basis path testing is same, but it is based on a White Box
Testing method, that defines test cases based on the flows or logical path that
can be taken through the program. In software engineering, Basis path testing
involves execution of all possible blocks in a program and achieves maximum
path coverage with the least number of test cases. It is a hybrid of branch
testing and path testing methods.

The objective behind basis path in software testing is that it defines the
number of independent paths, thus the number of test cases needed can be
defined explicitly (maximizes the coverage of each test case).

Here we will take a simple example, to get a better idea what is basis
path testing includeSteps for Basis Path testing
The basic steps involved in basis path testing include

 Draw a control graph (to determine different program paths)


 Calculate Cyclomatic complexity (metrics to determine the number of
independent paths)
 Find a basis set of paths
 Generate test cases to exercise each path
In the above example, we can see there are few conditional statements that is
executed depending on what condition it suffice. Here there are 3 paths or
condition that need to be tested to get the output,

 Path 1: 1,2,3,5,6, 7
 Path 2: 1,2,4,5,6, 7
 Path 3: 1, 6, 7

Advantages of Basic Path Testing


 It helps to reduce the redundant tests
 It focuses attention on program logic
 It helps facilitates analytical versus arbitrary case design
 Test cases which exercise basis set will execute every statement in a
program at least once

Conclusion:

Basis path testing helps to determine all faults lying within a piece of code.

REFERNCE BY GURU99 WEBSITE

You might also like