Today's Big Picture

Feb 3 2011   10:37AM GMT

QA #3 – Is Functional Testing sufficient to determine the Code Coverage?



Posted by: Shilpa Venkateshwaran
Software Technology, Software Testing Fundamentals

A fellow ITKE member asked

Is Functional Testing sufficient to determine the Code Coverage?

Is Functional Testing (User acceptance tests (business transaction flows), +ve input tests, -ve input tests) sufficient to determine the Code Coverage? Do we see any additional coverage when we do non-functional testing (example: load testing with the same inputs used in functional testing)? If so, How?

In testing when we refer to code coverage we are talking about how much of the code is being covered/executed/tested during test execution. So the goal behind code coverage is to determine areas that are not being tested and creating tests that can cover these gaps. Structural and functional testing can be used to determine code coverage. Code coverage is a form of white box testing where one looks at the code directly. A mix of white and black box testing is necessary to get maximum coverage. Just functional testing is not enough to do code coverage. There are some code that do not get executed from the front end or UI testing. There are codes in place for recovery, back up, load balancing, etc that have to be covered in non-functional testing.

Here is a link to some information related to code coverage

http://www.bullseye.com/coverage.html

 A trial tool for code coverage analysis

http://www.vectorcast.com/testing-solutions/code-coverage-analysis.php

Comment on this Post

Leave a comment:

DanAtNCover  |   Feb 3, 2011  3:40 PM (GMT)

Great distinction, Shilpa.

Traditionally code coverage products were relegated to the developer desktop environment. More recently, products like NCover (measures managed processes) have expanded that understanding to directly include white box testing and indirectly support coverage analysis for black box testing (via monitoring child processes for test applications such as QTP, TestComplete, or AutomatedQA).

The confluence of emerging development processes (Agile, BDD, etc) and the measured improvement of QA initiatives seems to demand a flexing of what was once a novelty metric. Further, many make the case that the best use of code coverage as an objective measurement of functional testing needs to include access to corollary cyclomatic complexity metrics.

By the way, NCover provides a no-strings-attached trial for anyone doing .NET development. And if you are working on anything OSS, come ask us for a complimentary license.

Free Trial (http://www.ncover.com/trial)
Free License (conversations@ncover.com)

Cheers,

Dan


 

Shillu13  |   Feb 11, 2011  9:12 AM (GMT)

Thanks DanAtNCover. You have provided some good info.