8 Easymock 3. There are two main streamlines in code coverage. After adding coverage reports to several work projects, I can tell you all of a sudden every developer on the team seems to commit a few more tests. 5, jacoco code coverage work fine even when using espresso, dagger. Here’s the description of JaCoCo from the official website: JaCoCo is a free code coverage library for Java, which has been created by the EclEmma team based on the lessons learned from using and integration existing libraries for many years. Below is the pom. As result zero code coverage for classes witch are loaded by PowerMock class loader. How to test Android with Gradle + Android Studio + Robolectric + Mockito + EasyMock/PowerMock + JaCoCo + TravisCI Here is my Github example:. The decision was made to use PowerMock. Test Coverage analysis (with JaCoCo and Sonar) for your Spring Boot app by Moisés Macero on February 6, 2016 One of the main metrics for a software project is Test Coverage: if done properly, it gives you a quick picture of how much code is protected by tests. Second way to get code coverage with JaCoCo - use offline Instrumentation. JaCoCo works as agent (there is another option where it can do offline instrumentation). Jacoco coverage lines count issue. [jacoco:report] Execution data for class xxxxx does not match. Help and support. This coverage information is an important input for the analysis. I've stumpled across JaCoCo while searching for a possibility to have the code coverage of a multi modul project merged. Jarkeld 01:15, 3 March 2013 (UTC). It is quite popular among the variety of code coverage frameworks out there. 1) Install EclEmma plugin to eclipse (that actually uses jacoco engine). Powermock is an awesome framework that extends mock frameworks like Mockito etc. PowerMock uses a custom classloader and bytecode manipulation to enable mocking of static methods, constructors, final classes and methods, private methods, removal of static initializers and more. However, for the code that is unit tested with PowerMock, the coverage is shown in red (uncovered). The changes target the following: 1. With EasyMock, it shows the coverage properly in green (as covered). 2 de PowerMock sont compatibles et que la couverture du code est générée avec succès. 0 of the Gradle plugin — I have no illusions about that. The problem happens when the test class is coded using powermock, and the class in test is declared into @PrepareForTest. the report of ProjectATest contains no coverage for sources of ProjectA. IntelliJ IDEA code coverage runner (recommended). 100: Build stability: No recent builds failed. We're using JaCoCo for coverage in our code and noticed that no coverage is reported for target classes that have been executed by unit tests that using a particular feature of PowerMock, specifically the @PrepareForTest annotation. Our configuration manager had installed it some time ago. Sonar can generate separate coverage data sets for every test case and show them in a combined report. class) to perform unit tests which require the mocking of static methods. so using the offline instrumentation and excluding some clousure classes it worked for me. Code Coverage in Practice Evgeny Mandrikov, SonarSource, @_godin_ Differential Code Coverage JaCoCo works for any code running on the JVM It is not intended to be used for profiling! Integration with Various Tools PowerMock might bypass agents, because reads files. We're using JaCoCo for coverage in our code and noticed that no coverage is reported for target classes that have been executed by unit tests that using a particular feature of PowerMock, specifically the @PrepareForTest annotation. After some initial troubles with Powermock the tests were running OK and coverage results were coming back as expected. Release Notes: (Released December 7, 2016) Fix incompatibility with Groovy 2. Java NetBeans テスト jacoco カバレッジ. Most of the mocking frameworks in Java cannot mock static methods or final classes. Powermock is an awesome framework that extends mock frameworks like Mockito etc. jacoco-maven-plugin. • Implementing Sonar-Qube for checking the quality of code and test coverage of the product. 11, JaCoCo is the only code coverage tool supported for integration tests code coverage inside. Currently offline jacoco instrumentation is not supported in TeamCity coverage plugin. report, ASM, Ant All libraries as well as the the JaCoCo Maven plug-in are also available from the Maven repository. When we set up the Test Gap Analysis for one of our customers, we have to instrument their application with a code coverage tool which records the lines of code executed during their tests. The JaCoCo plugin adds a project extension named jacoco of type JacocoPluginExtension, which allows configuring defaults for JaCoCo usage in your build. We are using EasyMock and PowerMock with JUnit. In this tutorial we will understand how to configure Jacoco in maven and how to use Jacoco to see code coverage report. Showing 1-12 of 12 messages. As mentioned above, there's no Green Button when it comes to a unified test coverage report. JaCoCo Maven Plugin. Long story short, my unit test is using a combination of @RunWith(PowerMockRunner. Reports in different formats are created with the report task. If you want to enforce minimum code coverage check, JaCoCo worked really in the projects that I've worked on so far. Jacoco coverage lines count issue. What is Code Coverage and why it is important? Code Coverage is an important topic when it comes to Test Driven Development (TDD). Fix the Sonar Violations and drop down the violations from 9000 to 120. 4: Central: 9: May, 2019: 0. Some projects are set up with unit tests in a separate module all by […]. High code coverage does not guarantee high quality of those tests. In this article we're going to stroll through some practical aspects of using JaCoCo – a code coverage reports generator for Java projects. Jacoco is a free code coverage library for Java. Interoperability with PowerMock overrides JaCoCo init method. I got your answer for the same from another post saying Jacoco doesn't work with framwork like PowerMock. 5: Central: 8: Oct, 2019: 0. closing as there is a powermock/jacoco problem to resolve out of our control for now (and a way to work around). PowerMock 25 usages. Hi! Thanks for your post. parent - submodule1 - unit test for submodule1 - submodule2 - unit test for submodule2 - submodule3 - unit test for submodule3 - parentpom file goal is, need a report where I can see code coverage report for all the modules (submodule1,submodule2,submodule3 etc) in order to achieve that, we need to create one more submodule(say report) parent. The prepare-agent goal sets up the "jacocoProperty" property to setup JaCoCo as agent on the the. DZone > Java Zone > Why is wide usage of PowerMock problematic. awesome-java. Have read similar questions on the web. The Jacoco plugin generates coverage reports based off the unit tests. The JaCoCo plugin for Maven only reports code coverage for tests run in a particular module rather than reporting coverage across modules. The code coverage report in the test projects doesn’t contain the coverage of the sources that lie in different projects. Integrate JaCoCo technology. No such luck and no-one to my knowledge has (yet) written a Gradle plug-in. The following is a list of provided dependencies for this project. - Able to perform Unit testing using PowerMockito framework. JaCoCo Code Coverage And Reports With Sonarqube. Release Notes: (Released December 7, 2016) Fix incompatibility with Groovy 2. Patrick McLaren. Me Every Time I Saw the Coverage Report. Post summary: Tutorial how to do code coverage with offline instrumentation with JaCoCo and Maven. These instructions assume you store the required jacoco jars in the following locations:. Jacoco – Measuring on ByteCode level which has the advantage that you can test your actual artifacts, but bytecode can be different to its source at times. Coverage is now close to 100%. 1) Red diamond:. Integrate JaCoCo technology. The decision was made to use PowerMock. 8 Easymock 3. Nov 26, 2019 8:26 PM. 12 JaCoCO 0. closing as there is a powermock/jacoco problem to resolve out of our control for now (and a way to work around). Line Coverage is a metric that measures how many and which lines have been covered during execution. Make sure the Code Coverage bundled plugin is enabled. 6 version or above. Some projects are set up with unit tests in a separate module all by […]. a découvert que la version 0. Additionally, it can measure and report cyclomatic complexity for methods and summarize the complexity for…. This metric is known as "test coverage" Line Versus Branch Coverage. This task can only be used in Build pipelines and is not supported in Release pipelines. How to mesure code coverage on tomcat using jacoco and eclipse Step by step. However there is a way to make it work together, using the PowerMock javaagent. By clicking this button you can launch your applications or unit tests in coverage mode to collect coverage statistics. a découvert que la version 0. coverageReportPaths, the coverage data provided by the various reports is cumulated. Jacoco splits collection of test coverage data from the generation of the coverage report. jacoco jacoco-maven-plugin 0. If you run coverage from Studio using JaCoCo, the Robolectric coverage is still not reported. The numbers looked good too. No such luck and no-one to my knowledge has (yet) written a Gradle plug-in. There is also no per-test data in Eclipse IDE (EclEmma, based on JaCoCo). Integrate JaCoCo technology. JaCoCo reports missing code coverage for tests using PowerMock 20-Feb-2018 We make heavy use of PowerMock in many of our JUnit tests and recently as we switched from Cobertura to JaCoCo something strange happened. Code Coverage. I showed you how to write unit tests for units with static methods. Fig: JaCoCo report. 22 Gretty supports Jacoco instrumentation of web-app projects. Integrate JaCoCo technology. This simplifies code coverage analysis a lot as no pre-instrumentation and classpath tweaking is required. xml (which used by Sonar) for cobertura + powermock. This first execution block tells jacoco where to store the unit test coverage data it will collect during unit test execution:. Code coverage is a software metric used to measure how many lines of our code are executed during automated tests. This tutorial shows how to measure and enforce code coverage with JaCoCo and its Gradle plugin, but the concepts are also valid for the JaCoCo Maven plugin. 2 is not out yet 😞 If you are like me, and can't wait to get this working, you can use the SNAPSHOT version of JaCoCo making this changes on your build. Enabling JaCoco coverage. COuld you please help. Effective Java Proudly powered by WordPress. What can code coverage be used for? White-box Testing (Unit Tests) Integration Testing Usage Analysis Differential Code Coverage JaCoCo works for any code running on the JVM It is not intended to be used for profiling! PowerMock might bypass agents, because reads files. Make EclEmma test coverage work with PowerMock. Full testing project with Docker and CICD https://github. Add comment. com/powermock/powermock/wiki/Code-coverage-with-JaCoCo. Can JaCoCo be integrated with TeamCity to run code coverage metrics? If so, could you please point me to some documentation that talks about this?. Due to a limitation in the way that the aggregate report is generated, there no line-by-line source reports are generated in the aggregate coverage report. Posted on 10/11/2017 by Fabian Streitel. To get the code coverage by integration tests on your project, you should simply follow the 5 steps below: Attach and configure a JaCoCo agent to the JVM which you will run your integration tests with. Have read similar questions on the web. Tell us who you are Name (required) Email. 2 de PowerMock sont compatibles et que la couverture du code est générée avec succès. Second, tools that instrument the bytecode, either before or during execution. executionData(tasks). There are therefore blocks required for each stage in the process. Part 1 : Setting up Sonar Server Locally In this tutorial, we will understand below topics - How to do Sonar Server Configuration locally?. Imagine a scene, where I have a class called TaxiFacade and the test class TaxiFacadeTest. #Java #Java8 #Unit Testing #Code Coverage #PowerMock. How to Set Up a Unified Test Coverage Report In Android With Jacoco and SonarQube. Shreyas R [MSFT] Sep 17, 2018 at 12:23 PM. jacocoとpowermockのオフラインインストルメンテーションは完全に機能しており、オンザフライのインストルメンテーションは機能せず、powermockチームは機能していますこれで。. However, what frustrates me is…. Showing 1-12 of 12 messages. In order to create a unified report, go to you Unit tests and run them all with coverage. yashwanth koundinya: The coverage is 0% for all the tests which use PowerMock. executionData(tasks) Adds execution data generated by a task to the list of those used during coverage analysis. coverageReportPaths, the coverage data provided by the various reports is cumulated. 5: Central: 8: Oct, 2019: 0. It can be used to identify which parts of your Java program are lacking test coverage. JaCoCo is a free Java code coverage library distributed under the Eclipse Public License. Through inheritance these profiles are available in each module and therefore you can run code coverage in the same way in each module. • Implemented Jacoco for test coverage. 6, it's now a supported plugin. The Jacoco plugin generates coverage reports based off the unit tests. I am trying to use the jacoco plugin and somehow setup the build so that when I run the unit tests the classes are already instrumented when powermock goes to do its thing, otherwise powermock instruments the classes and jacoco cannot find any of them because they no longer match, so all classes show 0% coverage. The task supports popular coverage result formats such as Cobertura and JaCoCo. closing as there is a powermock/jacoco problem to resolve out of our control for now (and a way to work around). Use a test-first development approach to integrate JUnit testing and JaCoCo /Sonarquebe code coverage reporting into the Jenkins build process. I've stumpled across JaCoCo while searching for a possibility to have the code coverage of a multi modul project merged. IntelliJ IDEA code coverage runner (recommended). Enable JaCoCo listener in Surefire Making it testable with EasyMock + PowerMock. > > I have two modules: A and B. In а few minutes you can download, configure and run SonarQube, connect it to your Bamboo server and show reports. Getting ready. Source directives are currently supported by Clover so this section discussed how to migrate your build from Clover to JaCoCo. Code coverage requirements can be specified for a. Then I have tried jacoco {toolVersion "0. jacocoとpowermockのオフラインインストルメンテーションは完全に機能しており、オンザフライのインストルメンテーションは機能せず、powermockチームは機能していますこれで。. One is running code coverage on each build measuring unit tests coverage. Sonar can generate separate coverage data sets for every test case and show them in a combined report. I updated the Jenkins git-client-plugin from 0. We recently switched from Cobertura to JaCoCo as the test code coverage tool for our services. Private method coverage when using PowerMock-EasyMock expectPrivate() Robert Jacobsen Aug 18, 2015. Code Coverage Unit tests by themselves do not provide enough confidence…. For example, even with 100% of code coverage there is no guarantee that certain functionality was developed correctly nor that it was developed at all. Sonarqube code coverage for Kotlin on Android with Bitrise. Searching for an option to JaCoCo we found Clover, a great API that fulfilled our needs. PowerMock example pom. 问题I have a bit of a problem getting code coverage reports for both Integration Tests and Unit Tests in Sonar for a Maven Plugin project (which uses invoker plugin for the integration tests). However, just wanted to check if there is a solution. Second way to get code coverage with JaCoCo - use offline Instrumentation. EMMA open-source toolkit. /gradlew connectedCheck or createDebugCoverageReport create the percentage of successfull/fail test cases, but no coverage report. If you want to have line number information included in the coverage reports or you want source code highlighting the class files of the test target must be compiled with debug information. Java NetBeans テスト jacoco カバレッジ. When I have tried to upgrade Java version to 1. Now it's time to see whether our unit tests provide enough code coverage. Hi, When running mvn clean install on my project my tests all pass correctly. Code Coverage. Jacoco is a free code coverage library for Java. EclEmma + JaCoCo yields 1 link on google books and it is a trivial mention. This can be an issue for multi-module projects where unit tests from one module test code in other modules. This metric is known as "test coverage" Line Versus Branch Coverage. Bad news is that 0. 【JaCoCo(Java Code Coverage)】NetBeansでの使用. Name Email Dev Id Roles Organization; Aliyun SDK: aliyunsdkaliyun. I showed you how to write unit tests for units with static methods. I'd like to invite you to actually participate in the AfD discussion at Wikipedia:Articles for deletion/JaCoCo. This plugin will work with multi-project gradle projects and aggregate then prints the aggregated unit test coverage. 8, got some issues due to the usage of Lambda expression. DZone > Java Zone > Why is wide usage of PowerMock problematic. After running our JaCoCo task again, we can see that we no longer have any ‘ghost’ methods. exe is not created by jacoco-maven-plugin?. For Java, our go-to tool is JaCoCo. There are therefore blocks required for each stage in the process. line coverage (how many lines of our code are covered by tests) branch coverage (how many branches, i. binaries, otherwise, you might get something like « Project coverage is set to 0% since there is no directories with classes. I updated the Jenkins git-client-plugin from 0. I tried to use PowerMock and JMockIt to test some legacy code. [jacoco:report] Execution data for class xxxxx does not match. Using JUnit, JaCoCo and Maven for code coverage Posted on February 1, 2014 by Robert Piasecki JaCoCo is quite a new tool for measuring and reporting code coverage with full support for Java 7. EclEmma Based Unit Test Coverage Generation for WSO2 Carbon Components. How shoud jacoco setup in wildfly. Use a test-first development approach to integrate JUnit testing and JaCoCo /Sonarquebe code coverage reporting into the Jenkins build process. Make sure the Code Coverage bundled plugin is enabled. 最近家里添丁,好久没更新blog。现在终于又可以有时间继续更新了。 继续上一次的话题:Powermock and sonar jacoco的覆盖率不兼容问题解决 1 在放弃了offline instrument之后,我们就转战普通的dymanic instrument,具体实现分两步介绍,第一步是配置dymanic instrument,之前参考了官方配置:. According to https://github. Both the class under test and the unit test code itself has no coverage report (when obviously, it has executed). Then keep reading, I've got your answer. 0 comments. Currently offline jacoco instrumentation is not supported in TeamCity coverage plugin. View Clelio De Souza (Leo)’s profile on LinkedIn, the world's largest professional community. Aggregated Jacoco reports in a multi-project Gradle build - build. It was developed as a replacement for EMMA, under the umbrella of the EclEmma plug-in for Eclipse. Reporting code coverage using Maven and JaCoCo to improve software quality and reduce bugs. Searching for an option to JaCoCo we found Clover, a great API that fulfilled our needs. The issues is that Jacoco does not like PowerMock instrumentation Here is a detail explanation:. 22 Gretty supports Jacoco instrumentation of web-app projects. org)の内容を参考にpom. JaCoCo is a free code coverage library for Java. Version Repository Usages Date; 0. The JaCoCo Maven Plugin provides the JaCoCo runtime agent to your tests and allows basic report creation. How shoud jacoco setup in wildfly. reportPaths is used together with sonar. coverage - powermock カバレッジ. execを出力するように指定します。test実行するとtarget以下にjacoco. There are many articles which show how to configure JaCoCo on a Java project. On investigating I found out that the test classes written using PowerMocks are getting skipped. I see that this can be obtained by adding a listener org. I followed this documentation. Analyzing code coverage with the Maven JaCoCo plugin JaCoCo is a free Java code coverage tool. 2) Yellow diamond:. Hi, When running mvn clean install on my project my tests all pass correctly. When I run the coverage using EclEmma in Eclipse I see the total lines count different ( per each module and also the total sum ) when compared to the total lines count found in the html report generated after the build. - Spy and Stub is used only when you have the reference to object which will be faked. Introduction to Code Coverage; Coverage Counters; Using JaCoCo. The problem is, that Sonarqube complains about low coverage in all of the classes using Lombok @Data annotation since the code generated by Lombok is not tested. exe is not created by jacoco-maven-plugin?. Still, there could be a case where the application under test does not support Java agents. by Joe Birch. Our project already have a big number of unit tests using Mockito + Powermock, but aparentely JaCoCo way of instrument code coverage is not compatible with those API's combination. Dylan Viljoen reported Sep 14, 2018 at 07:14 AM. Bad news is that 0. I've run into an interesting problem with Jacoco reporting 0% coverage for a class under unit test if @PrepareForTest is used. Java code coverage tools are of two types: first, tools that add statements to the Java source code and require its recompilation. JUnitListener, but it is a JUnit 4 listener, so I guess it is not working because of that. In this tutorial, we will understand the importance of code coverage and how can we setup the Sonar + JaCoCo + Maven to get the code coverage. Long story short, my unit test is using a combination of @RunWith(PowerMockRunner. Code coverage requirements can be specified for a. Focus on coverage of modified and new code Make coverage analysis an inherent part of your build/test chain Make coverage reports available to everybody in the team But not the management! Always go for functional coverage when writing tests Just executing code will not improve its quality!. exec jacoco 报告解析 jacoco导致问题. However, for the code that is unit tested with PowerMock, the coverage is shown in red (uncovered). No additional build steps needed - just choose JaCoCo coverage in a build step which runs tests: In the Code Coverage section, select JaCoCo as a coverage tool in the Choose coverage runner drop. I'm pretty new to th JaCoCo Maven Plugin, OSGi Multi-module-Project: No coverage of tested classes. Everything I already tried didn't work. Adds execution data files to be used during coverage analysis. I am using powermock in my application which does not play well with the online instrumentation performed by JaCoCo. This simplifies code coverage analysis a lot as no pre-instrumentation and classpath tweaking is required. This example also assumes you will use offline instrumentation which allows tools like Powermock to work. Adds execution data files to be used during coverage analysis. 追記 Kotlin対応 phicdy. Figure 2 Workflow of On-the-fly mode. If you keep the Java version down to 1. JaCoCo - Java Code Coverage Library. While code coverage can be used with any type of testing, it is most common and useful to tie it to unit tests. PowerMock enables us to write good unit tests for even the most untestable code. One great thing about Kotlin is the safe call for nullables – it really does help reduce null pointer exceptions and reduce the number of nested `if` blocks that visually litter a Java class. JaCoCo is available for Sonar 2. to is a 14 minute read. Integrate JaCoCo technology. The JaCoCo Maven plug-in provides the JaCoCo runtime agent to your tests and allows basic report creation. This is essentially the successor to Emma, and it has been developed by the EclEmma team as an Eclipse project. Are you using Jacoco to give you statistics on the unit test coverage of your source code? Have you encountered a problem where jacoco. Configuring Project First Of All (And Most Important) You need to commit a sonar-project. 4 to that new maven plugin for coverage reporting. JaCoCo - the new and revolting Java Code Coverage tool. maven jacoco Jacoco jacoco-maven-plugin jacoco sonar JaCoCo 插件 maven 集成 可执行jar 后端执行 后台执行 BeanFactoryAware后执行 执行后台 成才 执行 执行 执行 执行 笑过之后 并行执行 过程生成 才高行厚 自学成才 Maven jacoco maven powermock jacoco jacoco 版本 jmockit jacoco 冲突 无法生成jacoco. Posted on December 13, 2010 by keiki. JaCoCo is a free Java code coverage library distributed under the Eclipse Public License. I tried to use PowerMock and JMockIt to test some legacy code. Make sure the Code Coverage bundled plugin is enabled. This article is part of the Continuous Integration, Delivery and Deployment series. Please have a look at the PowerMock documentation to see what else PowerMock can do for you. As discussed in my article about 100% Code Coverage*, a code coverage tool should provide the means not only to measure code coverage, but also to enforce it. Post summary: Tutorial how to do code coverage with offline instrumentation with JaCoCo and Maven. The task supports popular coverage result formats such as Cobertura and JaCoCo. We are going to replace Javassist with ByteBuddy (#727) and it should help to resolve this old issue. See the complete profile on LinkedIn and discover Clelio’s connections and jobs at similar companies. A new Code Coverage tab has been enabled on the Build summary page. There are those times, however, when you come across some legacy code that doesn. Adds execution data files to be used during coverage analysis. Christian Dust. For measuring test coverage, we will use JaCoCo. JaCoCo is an open-source toolkit for measuring and reporting Java code coverage. no, there is no workaround. Java Code Coverage é uma biblioteca de código aberto para cobertura de código Java que é utilizada no plugin EclEmma para Eclipse e no plugin Code Coverage para IntelliJ IDEA. Analyzing code coverage with the Maven JaCoCo plugin JaCoCo is a free Java code coverage tool. This example also assumes you will use offline instrumentation which allows tools like Powermock to work. Step 1: Check-in your JUnit test cases in a maven project directory - (say src/test folder). The task supports popular coverage result formats such as Cobertura and JaCoCo. Integrate JaCoCo technology. As discussed in my article about 100% Code Coverage*, a code coverage tool should provide the means not only to measure code coverage, but also to enforce it. We just wanted to note that if your project is already leveraging JaCoCo to gather integration test coverage metrics, and is explicitly referring to JaCoCo artefact in this section, it can be left - no conflicts have been identified so far. xmlReportPaths or sonar. Additionally, it can measure and report cyclomatic complexity for methods and summarize the complexity for…. Powermock is an awesome framework that extends mock frameworks like Mockito etc. java,maven,code-coverage,jacoco. almost 5 years Support coverage for spawned (Java) child processes (Feature request) over 5 years Ability to specify include/exclude patterns in project properties over 5 years Classes which are provided in the "Excludes" should be removed from the coverage percentage. JaCoCo - the new and revolting Java Code Coverage tool. While code coverage can be used with any type of testing, it is most common and useful to tie it to unit tests. While it's possible to instrument test classes and run test frameworks with Cobertura and JaCoCo, there is no built-in, dedicated support for these frameworks. With EasyMock, it shows the coverage properly in green (as covered). We are using EasyMock and PowerMock with JUnit. The reports do not only show the coverage quota, but also include the source code and visualize which lines have been covered. Measuring test coverage. However, what frustrates me is…. Warning: According to the JaCoCo documentation, do not set forkCount to 0 or set forkMode to never as it would prevent executing the tests with the JaCoCo javaagent and no coverage would be recorded. 1) Install EclEmma plugin to eclipse (that actually uses jacoco engine) 2) Find jacocoagent. First add Powermock agent. Code Coverage in Practice Evgeny Mandrikov, SonarSource, @_godin_ Differential Code Coverage JaCoCo works for any code running on the JVM It is not intended to be used for profiling! Integration with Various Tools PowerMock might bypass agents, because reads files. Second way to get code coverage with JaCoCo - use offline Instrumentation. Hi, When running mvn clean install on my project my tests all pass correctly. Searching for an option to JaCoCo we found Clover, a great API that fulfilled our needs. Sometimes there were some strange crashes or clash with JaCoCo test coverage tool (have to say that I didn't give JMockIt deep chance and abandoned on it immediately after first problems).