Java code coverage tools: Difference between revisions

Content deleted Content added
Godin (talk | contribs)
No edit summary
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 requiresrequire 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 JCov[[Java andcode 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>[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[[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.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 ===