Java code coverage tools: Difference between revisions

Content deleted Content added
m OpenClover 4.3.1 released on 29 Sep 2018
Line 51:
| website = {{URL|jacoco.org/jacoco}}
}}
'''JaCoCo''' is an [[open-source software|open-source]] toolkit for measuring and reporting [[Java (programming language)|Java]] [[code coverage]]. JaCoCo is distributed under the terms of the [[Eclipse Public License]]. It was developed as a replacement for EMMA,<ref name="jacocomission">[http://www.eclemma.org/jacoco/trunk/doc/mission.html JaCoCo Mission]</ref> under the umbrella of the EclEmma plug-in for Eclipse.
 
=== Features ===
Line 60:
* like JCov and Cobertura prior to execution (offline)
 
And can be configured to store the collected data in a file, or send it via TCP. Files from multiple runs or code parts can be merged easily.<ref>[http://www.sonarsource.org/measure-coverage-by-integration-tests-with-sonar-updated/ Measure Coverage by Integration Tests with Sonar – Updated]</ref> Unlike Cobertura and Emma it fully supports Java 7, Java 8,<ref name="idea">{{cite web|url=http://www.jetbrains.com/idea/webhelp/code-coverage-2.html |archive-url=https://archive.is/20130426184708/http://www.jetbrains.com/idea/webhelp/code-coverage-2.html |dead-url=yes |archive-date=26 April 2013 |title=Code Coverage |author= |date= |work=IntelliJ IDEA 12.0 Web Help |publisher=JetBrains |accessdate=3 March 2013 }}</ref>, Java 9, Java 10 and Java 11.
 
=== Tools using or including JaCoCo ===
Line 107:
OpenClover is a free and open-source successor of Atlassian Clover, created as a [[Fork (software development)|fork]] from the Clover code base published by Atlassian in 2017. It contains all features of the original Clover (the server edition). The OpenClover project is led by developers who maintained Clover in years 2012-2017.<ref>[http://openclover.org/about-us OpenClover - About us]</ref>
 
OpenClover uses source code instrumentation technique and handles Java, [[Apache Groovy|Groovy]] and [[AspectJ]] languages. Some of its features include: fine control over scope of coverage measurement, test optimisation and sophisticated reports.
 
OpenClover integrates with [[Apache Ant|Ant]], [[Apache Maven|Maven]], [[Gradle]], [[Grails (framework)|Grails]], [[Eclipse (software)|Eclipse]], [[IntelliJ IDEA]], [[Bamboo (software)|Bamboo]], [[Jenkins (software)|Jenkins]], [[Hudson (software)|Hudson]], [[Griffon (framework)|Griffon]], [[SonarQube]] and AspectJ.
Line 124:
}}
 
Cobertura is an [[open-source software|open-source]] tool for measuring code coverage. It does so by instrumenting the byte code.
 
{{Clear}}
Line 139:
| website = {{URL|emma.sourceforge.net}}
}}
'''EMMA''' is an [[open-source software|open-source]] toolkit for measuring and reporting [[Java (programming language)|Java]] [[code coverage]]. EMMA is distributed under the terms of [[Common Public License]] v1.0.
 
EMMA is not currently under active development; the last stable release took place in mid-2005. As replacement, JaCoCo was developed.<ref>[http://sourceforge.net/projects/emma/files/ EMMA code coverage files on SourceForge.net]</ref>
Line 200:
| website = {{URL|https://wiki.jenkins-ci.org/display/JENKINS/Serenity+Plugin}}
}}
'''Serenity''' is an [[open-source software|open-source]] toolkit for measuring and reporting [[Java (programming language)|Java]] [[code coverage]]. As well as coverage, major code metrics are measured:- cyclometric complexity, stability, abstractness and distance from main. The report data is persisted to an object database, and made available via Jenkins/Hudson. The interface replicates the Eclipse IDE interface visually.
 
Serenity dynamically enhances the byte code, making a post-compile step unnecessary. Ant and Maven projects are supported. Configuration is done in xml, an Ant example would be: