Java code coverage tools: Difference between revisions

Content deleted Content added
m v2.05 - Repaired 1 link to disambiguation page - (You can help) - Maven / Fix errors for CW project (Title linked in text)
Line 56:
JaCoCo offers instructions, line and branch coverage.
 
In contrast to [[Java code coverage tools#Clover|Atlassian Clover]] and [[Java code coverage tools#OpenClover|OpenClover]], which require instrumenting the source code, JaCoCo can instrument Java bytecode using two different approaches:
* like [[Java code coverage tools#JCov|JCov]] on the fly while running the code with a Java agent<ref>{{cite web |url=http://onlysoftware.wordpress.com/2012/12/19/code-coverage-tools-jacoco-cobertura-emma-comparison-in-sonar/ |title=Code Coverage Tools (JaCoCo, Cobertura, Emma) Comparison in Sonar|author=Patroklos Papapetrou|date=19 December 2012 |work=Only Software matters |publisher= |accessdate=3 March 2013}}</ref>
* like [[Java code coverage tools#Cobertura|Cobertura]] and [[Java code coverage tools#JCov|JCov]] 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>{{Cite web |url=http://www.sonarsource.org/measure-coverage-by-integration-tests-with-sonar-updated/ |title=Measure Coverage by Integration Tests with Sonar – Updated |access-date=2013-03-01 |archive-date=2013-02-23 |archive-url=https://web.archive.org/web/20130223183723/http://www.sonarsource.org/measure-coverage-by-integration-tests-with-sonar-updated/ |url-status=dead }}</ref> Unlike Cobertura and [[Java code coverage tools#EMMA|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.today/20130426184708/http://www.jetbrains.com/idea/webhelp/code-coverage-2.html |url-status=dead |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, Java 11, Java 12, Java 13, Java 14, Java 15, Java 16, Java 17 and Java 18.
 
=== Tools using or including JaCoCo ===
Line 69:
* [[IntelliJ IDEA]] since v11<ref name=idea/>
* [[Gradle]] JaCoCo Plugin<ref>[http://www.gradle.org/docs/current/userguide/jacoco_plugin.html Gradle JaCoCo Plugin]</ref>
* [[Apache Maven|Maven]] JaCoCo Plugin<ref>[https://www.jacoco.org/jacoco/trunk/doc/maven.html Maven JaCoCo Plugin]</ref>
* [[Visual Studio Team Services]]<ref>[https://blogs.msdn.microsoft.com/devops/2015/11/24/testing-java-applications-with-visual-studio-team-services/ JaCoCo integration in Visual Studio Team Services]</ref>
* [[TeamCity]]<ref>[https://confluence.jetbrains.com/display/TCD10/JaCoCo JaCoCo integration in TeamCity]</ref>