[WEBINAR] The New Normal: Dealing with the Reality of an Unsecure World

Path Coverage Testing

Definition - What does Path Coverage Testing mean?

Path coverage testing is a specific kind of methodical, sequential testing in which each individual line of code is assessed.

As a type of software testing, path coverage testing is in the category of technical test methods, rather than being part of an overarching strategy or "philosophy" of code. It is labor-intensive and is often reserved for specific vital sections of code.

Techopedia explains Path Coverage Testing

The way that path coverage testing works is that the testers must look at each individual line of code that plays a role in a module and, for complete coverage, the testers must look at each possible scenario, so that all lines of code are covered.

In a very basic example, consider a code function that takes in a variable "x" and returns one of two results: if x is greater than 5, the program will return the result "A" and if x is less than or equal to 5, the program will return the result "B."

The code for the program would look something like this:

    input x
    if x > 5 then
    return A
    else return B

In order for path coverage testing to effectively "cover all paths," the two test cases must be run, with x greater than 5 and x less than or equal to 5.

Obviously, this method becomes much more complicated with more complex modules of code. Experts generally consider path coverage testing to be a type of white box testing, which actually inspects the internal code of a program, rather just relying on external inputs and strategies that are considered black box testing, which do not consider internal code.

Techopedia Deals

Connect with us

Techopedia on Linkedin
Techopedia on Linkedin
"Techopedia" on Twitter

Sign up for Techopedia's Free Newsletter!

Email Newsletter

Join thousands of others with our weekly newsletter

Free Whitepaper: The Path to Hybrid Cloud
Free Whitepaper: The Path to Hybrid Cloud:
The Path to Hybrid Cloud: Intelligent Bursting To Amazon Web Services & Microsoft Azure
Free E-Book: Public Cloud Guide
Free E-Book: Public Cloud Guide:
This white paper is for leaders of Operations, Engineering, or Infrastructure teams who are creating or executing an IT roadmap.
Free Tool: Virtual Health Monitor
Free Tool: Virtual Health Monitor:
Virtual Health Monitor is a free virtualization monitoring and reporting tool for VMware, Hyper-V, RHEV, and XenServer environments.
Free 30 Day Trial – Turbonomic
Free 30 Day Trial – Turbonomic:
Turbonomic delivers an autonomic platform where virtual and cloud environments self-manage in real-time to assure application performance.