Java coverage measurement library

I investigated the current state of open source libraries that can measure Java test coverage.

wrap up

Cobertura has stopped development, so from now on JaCoCo or Clover is likely to become the mainstream. However, since Clover has recently been open sourced, future continuous development (= community activity) is not very visible.

Overview of the three major libraries

JaCoCo

--The latest version is version 0.8.0 released in January 2018 (as of March 2018). --For classes that cannot be measured (on-the-fly instrumentation) at runtime, measurement processing can be added in advance (offline instrumentation) to the class file.

Cobertura

--Development stopped in February 2015. --If Java 8 is not supported and there is a notation such as Lambda expression, that part cannot be measured. --Supports aggregation of measurement reports for projects consisting of multiple modules that are not supported by other libraries.

Clover

--Originally it was commercial software, but it was made open source in April 2017. --Unlike other libraries, coverage is measured by adding measurement code to the source code instead of class files. --Supports not only cyclomatic complexity but also 20+ metrics.

Other libraries etc.

EclEmma

--Eclipse plug-in for performing coverage measurement with JaCoCo on Eclipse. --In the past, EMMA was used for the coverage measurement library, but since the development of EMMA stopped in 2005, we developed our own coverage measurement library JaCoCo. Moved here.

JMockit

reference

Recommended Posts

Java coverage measurement library
JAVA object mapping library
Accurate time measurement (Java)
Java bidirectional map library
Java CSV library "opencsv"
Java tree structure library
[Design pattern] Java core library
Code Climate Code quality, coverage measurement
Java
Java cache library and Eviction Policy
Welcome to the Java Library Swamp! !!
Java
[Java] Processing time measurement method memo
Memory measurement for Java apps using jstat
Call Java library from C with JNI
Java Artery-Easy to use unit test library
[Beginner] Java method / class / external library [Note 23]
[Java] Use cryptography in the standard library
2018 Java Recommended library for easily creating microservices
[JaCoCo (Java Code Coverage)] Use with NetBeans
Memory measurement of Java application on Windows
[Java] Let's make a DB access library!