Top 15 Code Coverage Tools (For Java, JavaScript, C++, C#, PHP)

List of the most popular code coverage tools for Java, JavaScript, C, C++, C#, PHP, Eclipse, .Net and many other programming languages:

In software testing, there are several ways to measure the coverage of testing. Code coverage method is one of the most important techniques.

Using the code coverage tools, one can identify the quantity of code tested while executing tests. In simple words, code coverage tells us how much of the source code is covered by a set of test cases. It is an important metrics to maintain a standard quality of QA efforts.

Code Coverage Tools

Code coverage is measured in percentage of the number of lines executed out of the total number of code lines while running tests.

At the time of writing test cases, one should put all the criteria in mind for maximum code coverage i.e. test cases should be written to cover all statements, functions, conditions, paths, decisions, loops, parameter value, entry and exit criteria.

We have several tools in the market to measure code coverage. Let's explore some of them in detail in this article.

******************

=>> Contact us to suggest your listing here.

******************

Most Popular Code Coverage Tools in 2019

Enlisted below is the list of the most popular Code Coverage Tools that are available in the market.

#1) Parasoft JTest

Parasoft Jtest is one of the products of Parasoft testing tools suite.

Jtest allows you to speed up the Java-based applications development with minimum risk, proper guidance, and analysis. It is used for unit test and code coverage integrated with manual and automation testing. Its report provides a good picture of code covered and thereby minimizes risks.

Parasoft JTest

Key Features:

  • It is used for Java-based applications.
  • It is a multi-tasking tool which includes Data flow analysis, Unit testing, Static analysis, runtime error detection, code coverage testing etc.
  • It can gather coverage from different frameworks and testing methods.
  • It can be run in command line mode, eclipse based GUI or with CI systems.
  • Its high-quality reporting and analysis include traceability and code-change based testing details too.

License Type: Proprietary commercial software

Official URL: Parasoft JTest

Pros and cons:

  • It is very expensive to use.
  • It is a good tool for the best quality product with a multipurpose solution for reducing time and risks.
  • The reports and analysis are very easy to understand and they complete maximum aspects of quality.

Latest release: Version 10.3.3 on November 7, 2017.

#2) Testwell CTC++

Testwell CTC++ is a very popular tool by Verifysoft Technology. It is a reliable code coverage and analysis tool for C, C++, C#, and Java.

This is the primary choice for most of the industries in any domain. It assures the completeness of the tests. It comes with a qualification kit. A Free trial, online training, and live presentations are also available for this tool. It is available in three packages CTC++ Host only, CTC++ Host-Target add-on and CTC++ Bitcov add-on.

For C# and Java, it requires a separate add-on package.

Testwell CTC++-dashboard

Key Features:

  • Its main feature is that it can be used for applications of different languages and domains.
  • It can be used with all unit testing tools too.
  • As a code coverage tool, it provides complete coverage including all criteria.
  • Reports can be obtained in straight text, HTML, JSON, XML and Excel form.

License Type: Initially, the trial version is available at a free of cost. For purchasing it or its add-on, one needs to contact them.

Official URL: Testwell CTC++

Pros and cons:

  • It is very reliable and easy to use. It avoids any untested code delivery.
  • A free trial version is available.
  • It can be used for applications in different languages like C, Java, C# etc.
  • It is good for all domains like healthcare, transportation, automotive etc., with high code coverage.
  • It supports all compilers and cross-compilers.
  • Its cost is not disclosed, hence you need to contact the company for pricing details.

Latest release: Version 8.2.2

#3) Cobertura

Cobertura is an open source code coverage tool for Java. This is a Jcoverage based tool. To use this tool one should declare Maven plug-in in POM.XML file.

cobertura-dashboard

Key Features:

  • It supports Java 7, Java 8, Java 9 and Java 10.
  • Cobertura can be executed from command line or ant.
  • After compilation, it calculates java bytecode.
  • It covers all the criteria of code coverage including branches, class, package etc.
  • The reports are produced in HTML or XML.
  • These reports have the features of filtering, ascending and descending.

License Type: GNU General Public License (GPL)

Official URL: Cobertura

Pros and cons:

  • It is an open source code coverage tool.
  • Its reports are easy to understand with options to filter as per the need.
  • It is well designed for developers as well as testers.
  • It works only for Java.

Latest release: Version 2.1.1

#4) JaCoCo

JaCoCo is a free code coverage toolkit developed by EclEmma. It was developed for the replacement of Emma code coverage tool. It can be used only for measuring and reporting Java-based applications.

jacoco - dashboard

Key Features:

  • This code coverage tool can be used only for Java. It supports Java 7, Java 8, Java 9 and Java 10.
  • It is compatible with all types of released Java class file version.
  • It covers lines, instructions, methods, type, branches, and cyclomatic complexity in code coverage.
  • It can instrument Java code in two different ways i.e. Either while running the code with the Java agent or before executing the code that is offline.
  • It stores the resulted data in a file or sends it via TCP. Its report formats include CVS, XML, and HTML.
  • It supports regression tests along with functional tests, where test cases are Junit based.

Official URL: JaCoCo

Pros and cons:

  • This is an open source code coverage tool.
  • It is bound for Java code coverage only.
  • It gives good performance for large-scale Java projects at a minimum runtime.
  • It requires less implementation with minimum dependencies on external libraries and resources.
  • There are many tools which support JaCoCo like Jenkins, Netbeans, Gradle, TeamCity, VS TEAM SERVICES, etc
  • It is easy to configure JaCoCo in Maven, Junit etc., in order to get code coverage report.
  • The report generated by JaCoCo is colorful and easy to understand.

Latest release: Version 0.8.1 on March 21, 2018.

#5) CodeCover

CodeCover tool is an extensible open source glass box testing tool that can be used as a code coverage for Java software. It was developed in 2007 at the University of Stuttgart. It can be executed in the command line, Eclipse, and Ant.

codecover-dashboard

Key Features:

  • It is a glass box testing tool for java applications.
  • It covers statements, loops, branches, etc along with term coverage, question mark operator coverage and synchronized coverage.
  • The reports are generated in the template engine velocity format.

License Type: EPL – Eclipse Public License.

Official URL: CodeCover

Pros and cons:

  • It is a free tool which can be used for code coverage.
  • It is used to enhance the quality of testing and to create new test cases.
  • It is limited for use in Java and COBOL.
  • It also has limitations to instrument a single source directory only.

Latest release: Version 1.0.1.2 in 2011

#6) BullseyeCoverage

Bullseye is a code coverage tool for C++ and C programs. Its price is $800 for the first year and $200 annually for renewal.

bullseyecoverage-dashboard

bullseye_view-dashboard

Key Features:

  • This code coverage analyzer can be used for C++ and C.
  • It has the feature to export the result to HTML, XML and GUI format.
  • It comes with additional features like merging, code excluding, visualize etc.
  • The biggest disappointment is that the merging of results can only be done at the functional level. It is not allowed in the statement or condition level.

License Type: Floating License

Official URL: Bullseye

Pros and cons:

  • Its use is limited to C++ and C.
  • The tool costs are high. Especially if one does not need its additional features like Visualizer, Merge, code excluding etc.
  • The tool is user-friendly and its usage is simple.
  • The reports are very straightforward and easy to understand.
  • Its speed of execution is very fast.
  • It's merging feature is not that good.

Latest release: Version 8.14 in March 2018

#7) EMMA

Emma is a very popular open source tool for Java software to measure code coverage. It was developed by Vlad Roubtsov. It covers all types of coverage like class, line, method etc.

emma-dashboard
emma- coverage report

Key Features:

  • It is 100% for Java software.
  • Its special feature is that it supports large-scale enterprise development.
  • This tool has a big share in the market when compared to the other free coverage tools.
  • The reports are available in XML, HTML and Plain text format.

License Type: CPL – Common Public License v1.0.

Official URL: EMMA

Pros and cons:

  • This is a free tool with very good speed.
  • It is quite easy to use and covers all criteria of code coverage.
  • Limited for its use in Java software.
  • It supports ANT.
  • It supports class instrumentation and can be executed offline or on a fly.
  • The biggest drawback is that it does not support the latest version of Java and is not well maintained.

Latest release: Emma-2.0.5320

#8) OpenCover

OpenCover is an open source tool for code coverage of .Net software. It works well for .Net 2 and above. It was developed to overcome the issues faced while using the tool PartCover for code coverage of .Net software.

opencover-dashboard

OpenCover-report

opencover- summary

Key Features:

  • It is for all .Net 2 and above software.
  • It can be installed by NuGet package, MSI or ZIP file.
  • It gives 64 and 32-bit support for .Net 4 and .Net 2.
  • It provides simple code coverage process.
  • It also provides better Generics handling than PartCover.
  • It is a command line tool.
  • It gives reports as an XML output file, which is used to produce graphical reports. This is done with the support of the Report generator tool.

License Type: MIT License

Official URL: OpenCover

Pros and cons:

  • It is a free tool for code coverage testing.
  • It is better than PartCover in several ways.
  • It provides very helpful documentation while installing OpenCover.

Latest release: OpenCover 4.6.519 on Feb 8, 2016

#9) NCover

NCover is the best code coverage tool developed by Peter Waldschmidt for the .Net platform. It is not a fully open source tool. Only its Beta version is available for free. It costs $480 for a complete NCover 3.

NCover-dashboard

Ncover-view-dashboard

ncover-coverage report

Key Features:

  • NCover tool is for .Net platform only.
  • This covers statement and branch coverage.
  • This tool analyses the code by instrumenting it behind that is private.
  • NCoverExplorer tool is available to browse the source code with coverage analysis.
  • Reports are presented in metrics of HTML format.

License Type: Floating License

Official URL: NCover

Pros and cons:

  • It is the best code coverage tool for .Net software.
  • Only the Beta version is free. Otherwise, it costs high to use this tool.
  • It has 4 years of maturity and is a very fast tool.
  • The support is very active and keeps on updating the releases with some new fixes and features.
  • It is very easy to create code coverage data with this tool.
  • It is good for manual as well as automated code coverage testing.

Latest release: NCOVER V5.5.3706.979 in Sept 2017

#10) Squish COCO

COCO is a cross-platform as well as a cross compiler multi-language code coverage tool by froglogic.

The languages supported by COCO include C++, C, C #, System C, Tcl, and QML. The reports are available in different formats like HTML, XML, Text, JUnit, AND Cobertura. The tool cost is not disclosed by FROGLOGIC. However, the license purchased will be valid for 1 year.

For more details, one needs to contact the support. It's trial version, demo, pieces of training and online support are available but with limitations on the basis of the license purchased.

Dashboard - Squish COCO froglogic - squish-dashboard

Squish COCO- Patch Analysis
Key Features:

  • It is a cross-platform and a cross-compiler code coverage tool.
  • It instruments the source code.
  • It can be integrated with different builds, tests and CI frameworks.
  • The feature of merging reports is available for better analysis.

License Type: Frog logic License – Floating License.

Official URL: Squish COCO

Pros and cons:

  • It supports multiple types of projects in a language like C++, C, C #, System C, Tcl, and QML.
  • It's trial version is available in the market with limitations.
  • Each license includes one year of support and updates.
  • It makes the process easy.
  • It covers criteria like statement, branches, and conditions.
  • The user can choose a different report format.
  • Finds redundant tests and unreachable or dead code.

Latest release: Version 4.0 in 2017

#11) CoverageMeter

CoverageMeter tool is the most commonly used code coverage tool chain for C/C++ applications. Its latest version is version 1.4. It helps in finding the untested source code. It contains two sub tools i.e. CoverageBrowser and CoverageScanner.

CoverageScanner works as a command line tool and substitutes the compiler. It is adapted to most of the compilers used in the market. CoverageBrowser works as a graphical interface which is used to analyze and manage final reports. After the execution, the final report can be analyzed and managed in the CoverageBrowser.

Key Features:

  • The tool mainly works in two parts i.e. CoverageScanner and CoverageBorwser.
  • It also comes with two small free tools – Execution agent and optional Visual studio 2005 and 2008.
  • It can be used only for C and C++ based applications.
  • Its cost is approximately $115.00. However, its trial version is also available in the market.

License Type: Shareware

Official URL: CoverageMeter

Pros and cons:

  • Its free trial is available in the market.
  • It is limited for C and C++ program only.
  • It covers all the criteria of code coverage like functional, statement, condition, path etc.

Latest release: Version 1.4

#12) GCT

GCT, Generic Coverage Tool, is a free code coverage tool for C by Brain Marick. It measures branches, loops and relational operator coverage. The tool gets C source code and then does instrumentation and produces the object by using the system C compiler. In another way like a true compiler, it calls C compiler after instrumenting.

Key Features:

  • It is good for C programs.
  • In the latest version, it behaves as a good compiler.
  • It covers branches, multiple-conditions, boundary-conditions, and loops.

License Type: GNU – General Public License.

Official URL: GCT

Pros and cons:

  • It is an open source and is easy to use with the powerful reporting system.
  • The tool runs only on UNIX.
  • The tool is large and has many parts in installation. This requires roughly 33000 1k blocks.
  • It has flexible reporting tools.

Latest release: GCT 1.4

#13) TCAT C/C++

TCAT is a code coverage tool to analyze C, C++, and JAVA. Its 2.1 version works well for NT 4.x and Windows 95. The kit of TCAT consists of the instrumented engine, runtime-unit and graphics oriented analyzer. In order to find the real cost and limitations, one has to contact them or send an e-mail.

Key Features:

  • It analyzes branches, functions and call-pair code coverage.
  • It works for C, C++, and Java.
  • Point and click method of coverage reporting makes the tool easier to use.
  • Availability of complete user documentation and powerful visualization software for helping users.
  • It has a Demo version which does not require a license key, whereas the full version requires a license key.

License Type: Standard floating license manager (flexlm)

Official URL: TCAT C/C++

Pros and cons:

  • Limited to C, C++, and JAVA.
  • Easily handles large and complex projects without capacity issues.
  • Good program understanding from call tree and digraphs.
  • It is very reliable, with minimum calculations and is fully complete for use of developers as well as testers.
  • The demo version is available for a period of 10 days only and that too with some restrictions.
  • The cost of the license is not disclosed.

Latest release: TCAT C/C++, Ver. 3.2.

#14) Gretel

Gretel is a free code coverage tool for Java program by Carls Howells at the University of Oregon. In order to install Gretel JVM 1.3 or later, BCEL (Byte Code Engineering Library) is required.

Key Features:

  • It supports statement coverage for Java program.
  • It assists residual test coverage too by re-instrumenting the program and removing the instrument from the already executed code.
  • It can be started in a command line or GUI.
  • Reports are available in GUI.

License Type: BSD

Official URL: Gretel

Pros and cons:

  • It is an open source tool.
  • It is not compatible with JUnit.

Latest release: Version 1.0rc2 in June 2002.

#15) JCov

Jcov is an open source Java code coverage tool. It is developed and implemented with SUN JDK. It works by instrumenting java bytecode in two ways i.e. Static instrumentation and dynamic instrumentation.

Key Features:

  • The tool is good for Java projects.
  • It reports Block, line, branch and method coverage.
  • It can save the collected data in the file system or on a server.
  • It instruments java bytecode.
  • It can instrument on the fly as well as offline.

License Type: GPL V2

Official URL: JCov

Pros and cons:

  • It is an open source code coverage tool.
  • It is limited only to Java projects.
  • It covers almost all the criteria of code coverage.

Latest release: JCov Version 3 in 2014.

Conclusion

Using code coverage to maintain a standard quality of testing leads to include additional test cases to make sure that the code is executed while running test suites as much as possible. This indeed is quite helpful for effective regression testing.

Code coverage tools are just used to measure the code covered while running tests.

It is very rare to find 100% code coverage, and even a 100% code coverage does not prove 100% quality testing. You may achieve 100% code coverage while still missing some of the important test cases. In order to achieve a better level of effective testing, one should go for Mutation Testing instead of normal code coverage.

******************

=>> Contact us to suggest a listing here.

******************