:microscope: Java Code Coverage Library

Overview

JaCoCo Java Code Coverage Library

Build Status Build status Maven Central

JaCoCo is a free Java code coverage library distributed under the Eclipse Public License. Check the project homepage for downloads, documentation and feedback.

Please use our mailing list for questions regarding JaCoCo which are not already covered by the extensive documentation.

Note: We do not answer general questions in the project's issue tracker. Please use our mailing list for this.

Comments
  • Filtering options for coverage analysis

    Filtering options for coverage analysis

    JaCoCo should support configurable filtering options for code coverage analysis. This page lists of use cases and requirements: https://github.com/jacoco/jacoco/wiki/FilteringOptions

    type: enhancement component: core.filters 
    opened by marchof 110
  • Add aggregate-report that reports cross module code coverage for the maven plugin

    Add aggregate-report that reports cross module code coverage for the maven plugin

    We have had issues with gaining accurate cross module code coverage numbers with jacoco. For instance when code in module A is touched during tests from module B, in our case when they are both part of a multi-module build.

    This pull request makes it possible to report coverage numbers on classes outside of the current module. By adding a list of sourceFolders and classFolders which is a list of source and class folders outside of the current module to be scanned for classes to report coverage on.

    The aggregate-report then concatenates the jacoco.exec files from reactor projects so that a unified report can be created.

    type: enhancement component: maven 
    opened by johnoliver 81
  • Support for JDK 1.8.0

    Support for JDK 1.8.0

    Status Overview

    Latest snapshot build: Snapshot Repository

    [x] ASM5: Release Required

    We need a new ASM version which supports class file version 52.0. ASM 5.0_BETA is released to Maven central repo.

    [x] Adjust JaCoCo to new ASM APIs: Done

    JaCoCo needs to be adjusted to ASM5 APIs. This has been done on a experimental branch.

    [x] Select proper runtime implementation: Done

    The ModifiedSystemClassRuntime does not work any more with JRE 8. So an alternative Runtime has to be selected. The UrlStreamHandlerRuntime seems to do the job.

    [x] Maven JavaDoc: Workaround

    With JDK 8 JavaDoc generated by Maven fails to compile due to Lint checks. As a workaround we can disable this check for the Maven plugin.

    [x] Invalid Line Numbers: Fixed with JDK Build 103

    The JDK 8 compiler missed line number information in certain cases which makes our integration tests fail (and also leads to wrong line coverage results).

    type: enhancement component: core 
    opened by szegedi 63
  • >= 0.7.3 breaks Gradle + JUnit + Robolectric coverage (Android)

    >= 0.7.3 breaks Gradle + JUnit + Robolectric coverage (Android)

    Version info: Gradle 2.2.1 Android Gradle plugin 1.0.1 Robolectric Gradle plugin 0.14.1 JUnit 4.10 Robolectric 2.4

    Setting up a simple test using a configuration like:

    apply plugin: 'jacoco'
    jacoco.toolVersion = project.property('jacocoVersion')
    

    and running my unit tests with:

    $ ./gradlew -PjacocoVersion=0.7.1.+ clean :testDebug :jacocoTestDebugReport
    ...
    $ ls -l build/jacoco/testDebug.exec
    -rw-r--r--+ 1 jhansche  staff  278218 Feb 26 16:45 build/jacoco/testDebug.exec
    $ strings build/jacoco/testDebug.exec | wc -l
        4325
    

    This all works correctly, and I get a proper JaCoCo report generated. Changing nothing else but the toolVersion, however, breaks the execution data that is gathered:

    $ ./gradlew -PjacocoVersion=0.7.4-SNAPSHOT clean :testDebug :jacocoTestDebugReport
    ...
    $ ls -l build/jacoco/testDebug.exec
    -rw-r--r--+ 1 jhansche  staff  36910 Feb 26 16:56 build/jacoco/testDebug.exec
    $ strings build/jacoco/testDebug.exec | wc -l
         639
    

    You can see that the execution data file is much smaller, and contains far fewer strings. Looking at the "Sessions" link in the top-right of the HTML report lists only one class from my application's package (the Android app's R$styleable class). The majority of the classes listed are in one of the org.gradle, org.junit, or org.robolectric packages. Using 0.7.1, it included all the android.** classes, and more importantly, the classes from my application.

    However, when I set the test.jacoco.classDumpFile = file("${project.buildDir}/jacoco/dump") property, I do see most of my application's (tested) classes listed in that directory -- they just don't show up in the execution data file.

    One other difference that I notice in the dump/ directory (for a single example test class):

    0.7.1: build/jacoco/dump//com/example/MyClass.class build/jacoco/dump//com/example/MyClassTest.class

    0.7.4: build/jacoco/dump//com/example/MyClass.9b700a23ba643d32.class build/jacoco/dump//com/example/MyClassTest.22115a9aa9d0d3ee.class

    I'm in a difficult position as now I am forced to use two different versions of JaCoCo: 0.7.1 with Robolectric+JUnit to get coverage of unit tests on the local JVM; and 0.7.3+ with Calabash to get coverage of instrumentation tests running on the device's runtime -- I am forced to update to 0.7.3 in order to allow support for the Android ART runtime, as otherwise the instrumented classes cannot be installed on a Lollipop device.

    What other information can I provide to help track down what is going wrong here? If it's not a bug in JaCoCo, then who is to blame? (I realize there is a very long list of potential candidates for where it should be fixed).

    type: bug :bug: component: core 
    opened by jhansche 61
  • java.nio.channels.OverlappingFileLockException for Jacoco offline

    java.nio.channels.OverlappingFileLockException for Jacoco offline

    Hi, recently I used Jacoco 0.7.2 to test our AppServer, Encountered such a problem:

    java.nio.channels.OverlappingFileLockException 
    at sun.nio.ch.SharedFileLockTable.checkList(FileLockTable.java:255) 
    at sun.nio.ch.SharedFileLockTable.add(FileLockTable.java:152) 
    at sun.nio.ch.FileChannelImpl.lock(FileChannelImpl.java:1030) 
    at java.nio.channels.FileChannel.lock(FileChannel.java:1053) 
    at org.jacoco.agent.rt.internal_e6e56f0.output.FileOutput.openFile(FileOutput.java:69) 
    at org.jacoco.agent.rt.internal_e6e56f0.output.FileOutput.writeExecutionData(FileOutput.java:53) 
    at org.jacoco.agent.rt.internal_e6e56f0.Agent.shutdown(Agent.java:137) 
    at org.jacoco.agent.rt.internal_e6e56f0.Agent$1.run(Agent.java:54) 
    

    In Jacoco Offline, are there different threads to synchronisation/write locking for jacoco.exec in one JVM? In order to avoid concurrent writes from different threads running in parallel in one JVM, I changed some code, it can solve our problem temporarily, as below:

    private OutputStream openFile() throws IOException {
      final FileOutputStream file = new FileOutputStream(destFile, append);
      int retries = 5;//retries 5 times
      // Avoid concurrent writes from different agents running in parallel:
      for (int t = 0; t < retries; t++)
      try{
          file.getChannel().lock();
          break;
      }catch(OverlappingFileLockException ofe){
          System.out.println("[JACOCO][RT] Got OverlappingFileLockException, re-trying.");
          try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    //ignore
                }
      }
      return file;
     }
    

    Please help to check the issue.

    type: enhancement component: core 
    opened by david-wei-wei 46
  • Provide better coverage data in case of implicit exceptions

    Provide better coverage data in case of implicit exceptions

    This is an alternative approach to the PR proposed in #261. The objective is to improve covered result in case implicit exceptions are thrown by method invocations. Instead of adding a extra probe for every method invocation this PR adds probes only between source lines -- and only if the subsequent line contains at least one method invocation.

    This reduces the number of extra probes needed and at the same time provides better results in case of implicit exceptions in multi-line blocks.

    type: enhancement component: core 
    opened by marchof 41
  • Frames are re-calculated for large methods

    Frames are re-calculated for large methods

    JaCoCo cannot re-calculate stackmap frames as this is an expensive operation and would require knowing the type hierarchy (which is not available). Also ASM default implementation for the type hierarchy actually loads(!) the classes.

    Therefore in JaCoCo special care has been taken to incrementally update the stackmap frames during instrumentation.

    It has been reported that the stackmap frame are re-calculated anyways is special situations, stack trace:

    java.lang.ClassNotFoundException: javax.servlet.jsp.tagext.BodyContent
             at org.jacoco.asm.ClassWriter.getCommonSuperClass(Unknown Source)
             at org.jacoco.asm.ClassWriter.a(Unknown Source)
             at org.jacoco.asm.Frame.a(Unknown Source)
             at org.jacoco.asm.Frame.a(Unknown Source)
             at org.jacoco.asm.MethodWriter.visitMaxs(Unknown Source)
             at org.jacoco.asm.ClassReader.a(Unknown Source)
             at org.jacoco.asm.ClassReader.b(Unknown Source)
             at org.jacoco.asm.ClassReader.accept(Unknown Source)
             at org.jacoco.asm.ClassReader.accept(Unknown Source)
             at org.jacoco.asm.ClassWriter.toByteArray(Unknown Source)
             at org.jacoco.core.instr.Instrumenter.instrument(Instrumenter.java:79)
             at org.jacoco.core.instr.Instrumenter.instrument(Instrumenter.java:139) 
    

    Looking at ASM source code it turned out that ASM triggers a frame re-calculation if the methods exceeds a certain size. See MethodWriter.resizeInstructions(). Shit.

    Corresponding ASM issue: http://forge.ow2.org/tracker/?func=detail&aid=317551&group_id=23&atid=100023

    type: bug :bug: component: core 
    opened by marchof 41
  • JaCoCo fails to start when another agent uses UUID prior to JaCoCo

    JaCoCo fails to start when another agent uses UUID prior to JaCoCo

    This is a issue tracker. Please use our mailing list for general questions: https://groups.google.com/forum/?fromgroups=#!forum/jacoco

    Also check FAQ before opening an issue: http://www.jacoco.org/jacoco/trunk/doc/faq.html

    Steps to reproduce

    Create a javaagent which loads the UUID class and use that agent prior to JaCoCo.

    Expected behaviour

    JaCoCo should run normally

    Actual behaviour

    JaCoCo fails with an error similar to the following:

    java.lang.reflect.InvocationTargetException
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:483)
            at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:386)
            at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:401)
    Caused by: java.lang.RuntimeException: Class java/util/UUID could not be instrumented.
            at org.jacoco.agent.rt.internal_6effb9e.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:138)
            at org.jacoco.agent.rt.internal_6effb9e.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:99)
            at org.jacoco.agent.rt.internal_6effb9e.PreMain.createRuntime(PreMain.java:55)
            at org.jacoco.agent.rt.internal_6effb9e.PreMain.premain(PreMain.java:47)
            ... 6 more
    Caused by: java.lang.NoSuchFieldException: $jacocoAccess
            at java.lang.Class.getField(Class.java:1690)
            at org.jacoco.agent.rt.internal_6effb9e.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:136)
            ... 9 more
    FATAL ERROR in native method: processing of -javaagent failed
    Exception in thread "main"
    
    type: enhancement component: core 
    opened by nadavye 38
  • Aggregate Report Maven Goal

    Aggregate Report Maven Goal

    To finally offer a solution for multi module Maven projects (#18) I did a detailed analysis of the issue together with @jwloka. We documented the results here:

    https://github.com/jacoco/jacoco/wiki/MavenMultiModule

    As part of the analysis we also reviewed the existing PR #97. We came up with a different solution which should cover the described use cases and should be more robust in terms of build configuration and execution.

    Please feel free to add comments regarding the general approach as well as the implementation

    type: enhancement component: maven 
    opened by marchof 36
  • Doubled javaagent in argLine

    Doubled javaagent in argLine

    1. I'm using plugin 0.6.0
    2. I've jacoco-maven-plugin doubled because I want to measure unit tests result (in test phase with surefire) but also integration tests (in integration-test phase with failsafe)
    3. Before test phase everything is OK: argLine set to -javaagent:/home/devel/tools/maven/repo/org/jacoco/org.jacoco.agent/0.6.0.201210061924/org.jacoco.agent-0.6.0.201210061924-runtime.jar=destfile=/home/devel/projects/micro/webapp/target/jacoco-unit.exec
    4. Before integration-test phase there is problem with correct argLine, because of the prepending it looks that: argLine set to -javaagent:/home/devel/tools/maven/repo/org/jacoco/org.jacoco.agent/0.6.0.201210061924/org.jacoco.agent-0.6.0.201210061924-runtime.jar=destfile=/home/devel/projects/micro/webapp/../target/jacoco-it.exec -javaagent:/home/devel/tools/maven/repo/org/jacoco/org.jacoco.agent/0.6.0.201210061924/org.jacoco.agent-0.6.0.201210061924-runtime.jar=destfile=/home/devel/projects/micro/webapp/target/jacoco-unit.exec As you can see there are two javaagents what results in: java.lang.instrument.IllegalClassFormatException: Error while instrumenting class org/apache/maven/surefire/booter/ForkedBooter. Caused by: java.lang.IllegalStateException: Class org/apache/maven/surefire/booter/ForkedBooter is already instrumented. When we remove second javaagent (by defining it in the argLine property in the failsafe-plugin configuration it works great.

    Example pom's:

     <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.12.4</version>
            <configuration>
              <excludedGroups>gui,arquillian</excludedGroups>
            </configuration>
          </plugin>
    
          <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <version>${jacoco.version}</version>
            <executions>
              <execution>
                <id>jacoco-initialize</id>
                <goals>
                  <goal>prepare-agent</goal>
                </goals>
                <configuration>
                  <destFile>${project.basedir}/target/jacoco-unit.exec</destFile>
                </configuration>
              </execution>
            </executions>
          </plugin>
    
        </plugins>
      </build>
    
      <profile>
          <id>arquillian</id>
           <build>
            <plugins>
              <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco.version}</version>
                <executions>
                  <execution>
                    <id>pre-integration-test</id>
                    <goals>
                      <goal>prepare-agent</goal>
                    </goals>
                    <phase>pre-integration-test</phase>
                    <configuration>
                      <destFile>${project.basedir}/../target/jacoco-it.exec</destFile>
                    </configuration>
                  </execution>
                </executions>
              </plugin>
              <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>2.12.4</version>
                <configuration>
                  <groups>gui,arquillian</groups>         
                  <includes>
                    <include>**/*.java</include>
                  </includes>
                </configuration>
                <executions>
                  <execution>
                    <id>integration-test</id>
                    <goals>
                      <goal>integration-test</goal>
                      <goal>verify</goal>
                    </goals>
                  </execution>
                </executions>
              </plugin>
            </plugins>
          </build>
      </profile>
    
    type: bug :bug: component: maven 
    opened by jkubrynski 34
  • Fix instrumentation to not violate Java Virtual Machine Specification regarding initialization of final fields

    Fix instrumentation to not violate Java Virtual Machine Specification regarding initialization of final fields

    Currently FieldProbeArrayStrategy creates static final field $jacocoData, value for which is set by bytecode instruction putstatic in method $jacocoInit, but according to JVMS:

    if the field is final the instruction must occur in the < clinit > method of the current class. Otherwise, an IllegalAccessError is thrown.

    Starting with OpenJDK 9 EA b127 this condition is checked for class files with version >=53 - http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/c558d46c1af2#l11.76 Unfortunately we compile classes into 52 even with JDK 9, because maven-shade-plugin can't handle 53, and that's why we don't get failure in core validation tests, but later in integration tests for Ant on one of JDK classes:

    Exception in thread "main" java.lang.IllegalAccessError: Update to static final field java.sql.Timestamp.$jacocoData attempted from a different method (java.sql.Timestamp) than the initializer method <clinit> 
        at java.sql.Timestamp.$jacocoInit(java.sql@9-ea/Timestamp.java)
        at java.sql.Timestamp.<clinit>(java.sql@9-ea/Timestamp.java)
        at org.jacoco.ant.TestTarget.main(TestTarget.java:36)
    

    There is also a report in our mailing list - https://groups.google.com/d/msg/jacoco/jHw39ZUjUNY/L-gHeMeBBQAJ

    See https://bugs.openjdk.java.net/browse/JDK-8157181 which is associated with this check and which also states:

    Methods that do not satisfy condition violate the assumptions of the compilers. Compiling such methods results in different behavior of compiled and interpreted code.

    and which discusses removal of dependency on class file version.

    Also might be that this check will be backported - see linked tickets, e.g. https://bugs.openjdk.java.net/browse/JDK-8161989

    So that we should try to find a way to compile classes (or at least test targets) into bytecode version 53 ( #411 ).

    In any case - field must not be final. But unfortunately this will make FieldProbeArrayStrategy unusable for interfaces with methods, because JVMS states that

    Fields of interfaces must have their ACC_PUBLIC, ACC_STATIC, and ACC_FINAL flags set

    type: bug :bug: component: core 
    opened by Godin 32
  • Jacoco inserting instructions between catch handlers in monitor blocks

    Jacoco inserting instructions between catch handlers in monitor blocks

    An issue was reported to the D8 issue tracker regarding jacoco and monitor instructions: https://issuetracker.google.com/issues/247932119

    The problem seems to be come from kotlin code like the following:

        val obj = Any()
        try {
            synchronized(obj) {
                Log.d("Test", "Succeeded")
            }
        } catch (ex: Exception) {
            Log.e("Test", "Failed", ex)
        }
    

    That is, having an outer try catch around a synchronized block.

    The dissassembled code before jacoco is:

      public void run();
        descriptor: ()V
        flags: (0x0001) ACC_PUBLIC
        Code:
          stack=7, locals=5, args_size=1
    ...
            71: monitorenter
            72: getfield      #73                 // Field com/fyber/inneractive/sdk/config/k.b:Lcom/fyber/inneractive/sdk/config/k$c;
            75: dup
            76: astore        4
            78: iload_1
            79: aload         4
            81: iload_2
            82: aload         4
            84: aload_0
            85: putfield      #78                 // Field com/fyber/inneractive/sdk/config/k$c.a:Ljava/lang/String;
            88: putfield      #81                 // Field com/fyber/inneractive/sdk/config/k$c.b:Z
            91: putfield      #84                 // Field com/fyber/inneractive/sdk/config/k$c.c:Z
            94: monitorexit
            95: goto          104
            98: astore_0
            99: aload_0
           100: aload_3
           101: monitorexit
           102: athrow
           103: pop
           104: return
           105: astore_0
    ...
          Exception table:
             from    to  target type
                 0     6   105   Class java/lang/ClassNotFoundException
                 7    17   105   Class java/lang/ClassNotFoundException
                35    38   103   Class android/provider/Settings$SettingNotFoundException
                40    45   103   Class android/provider/Settings$SettingNotFoundException
                55    62   103   Class android/provider/Settings$SettingNotFoundException
                65    68   103   Class android/provider/Settings$SettingNotFoundException
                71    72   103   Class android/provider/Settings$SettingNotFoundException
                72    75    98   any
                78    94    98   any
                94    98   103   Class android/provider/Settings$SettingNotFoundException
                99   103   103   Class android/provider/Settings$SettingNotFoundException
    

    Note that the any handler on the monitor body is split in two, from 72-75 target 98 and 78-94 target 98. Jacoco will insert an aput-boolean in between here, but assign it the outer-most try-catch handler thereby escaping a catch handler where the monitor exit instruction should be called. As a result all android vms will report a verify-error:

    10-31 06:01:51.084 14348 14348 E AndroidRuntime: java.lang.VerifyError: Verifier rejected class com.fyber.inneractive.sdk.config.s: void com.fyber.inneractive.sdk.config.s.run() failed to verify: void com.fyber.inneractive.sdk.config.s.run(): [0x70] expected to be within a catch-all for an instruction where a monitor is held (declaration of 'com.fyber.inneractive.sdk.config.s' appears in /data/app/com.example.monitorjacoco-UHj9aK0fXwUPdts0cNWNAQ==/base.apk)
    10-31 06:01:51.084 14348 14348 E AndroidRuntime: 	at com.example.monitorjacoco.MainActivity$1.onClick(MainActivity.java:43)
    10-31 06:01:51.084 14348 14348 E AndroidRuntime: 	at android.view.View.performClick(View.java:7125)
    10-31 06:01:51.084 14348 14348 E AndroidRuntime: 	at android.view.View.performClickInternal(View.java:7102)
    10-31 06:01:51.084 14348 14348 E AndroidRuntime: 	at android.view.View.access$3500(View.java:801)
    10-31 06:01:51.084 14348 14348 E AndroidRuntime: 	at android.view.View$PerformClick.run(View.java:27336)
    10-31 06:01:51.084 14348 14348 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:883)
    10-31 06:01:51.084 14348 14348 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:100)
    10-31 06:01:51.084 14348 14348 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:214)
    10-31 06:01:51.084 14348 14348 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7356)
    10-31 06:01:51.084 14348 14348 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
    10-31 06:01:51.084 14348 14348 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
    10-31 06:01:51.084 14348 14348 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
    

    I've attached a debug test example where the class and method that cause the problem is in class com/fyber/inneractive/sdk/config/s method run.

    Steps to reproduce

    • JaCoCo version: 0.8.8 and prior
    • Complete executable reproducer: Android studio project
    • Steps: run in debug mode with instrumentation

    Expected behaviour

    Not inserting instructions between catch handlers in monitors.

    MonitorJacoco.zip

    If you just want the class files without going through a reproduction, I've also attached the classes.jar here, from https://mvnrepository.com/artifact/com.fyber/marketplace-sdk. classes.zip

    type: bug :bug: reproducer required 
    opened by mkj-gram 5
  • ignore the assert statement's conditional branch.  (#1378)

    ignore the assert statement's conditional branch. (#1378)

    assert statement coverage should be considered complete if the assert statement was visited. There's no need to track multiple branches at the assert statement.

    This is in agreement with the previously reported issue #324, which suggested "They should not be treated as code instructions."

    I've extended the ignored instructions to include the assert statement check. This will make coverage complete with or without assertions enabled.

    opened by morganga 2
  • AssertFilter does not ignore the assert statement

    AssertFilter does not ignore the assert statement

    Steps to reproduce

    • JaCoCo version: 0.8.8.20220405071
    • Operating system: Mac OS
    • Tool integration: Maven
    • Complete executable reproducer: https://github.com/morganga/jacoco-bug
    • Steps: mvn clean install the build fails (100% coverage is required) and the target/site/jacoco/net.gcvs.jacoco/App.java.html report does not indicate full coverage of the assert statements.

    Expected behaviour

    coverage of assert statement is considered complete, line in coverage report is green. Code coverage should be considered complete with or without assertions enabled.

    Actual behaviour

    assert statement contains two branches and "1 of 2 branches missed", line in coverage report is yellow.

    Currently the only way to obtain full coverage of an assert statement is by running the tests twice in the same test suite, once with assertions enabled, and again with assertions disabled, so both branches of the assert statement enabled test are visited.

    https://github.com/jacoco/jacoco/issues/324 raised the problem of only 50% branch coverage. The AssertFilter introduced in 0.8.8 reduced the problem from a "2 of 4 branches missed" to a "1 of 2 branches missed". This wasn't exactly the intension of the #324 issue, which suggested "They should not be treated as code instructions."

    (In case of exceptions provide FULL STACKTRACE)

    type: bug :bug: 
    opened by morganga 1
  • Document `includeCurrentProject` available as of 0.8.9

    Document `includeCurrentProject` available as of 0.8.9

    Follow-up to https://github.com/jacoco/jacoco/pull/1007. The new includeCurrentProject that has yet to be released is listed in the documentation as available since release 0.7.7.

    component: documentation 
    opened by MikeEdgar 3
  • Bump scala-library from 2.13.4 to 2.13.9 in /org.jacoco.core.test.validation.scala

    Bump scala-library from 2.13.4 to 2.13.9 in /org.jacoco.core.test.validation.scala

    Bumps scala-library from 2.13.4 to 2.13.9.

    Release notes

    Sourced from scala-library's releases.

    Scala 2.13.9

    The following changes are highlights of this release:

    Compatibility with Scala 3

    • Tasty Reader: Add support for Scala 3.2 (#10068)
    • Tasty Reader: Restrict access to experimental definitions (#10020)
    • To aid cross-building, accept and ignore using in method calls (#10064 by @​som-snytt)
    • To aid cross-building, allow ? as a wildcard even without -Xsource:3 (#9990)
    • Make Scala-3-style implicit resolution explicitly opt-in rather than bundled in -Xsource:3 (#10012 by @​povder)
    • Prefer type of overridden member when inferring (under -Xsource:3) (#9891 by @​som-snytt)

    JDK version support

    Warnings and lints

    • Add -Wnonunit-statement to warn about discarded values in statement position (#9893 by @​som-snytt)
    • Make unused-import warnings easier to silence (support filtering by origin=) (#9939 by @​som-snytt)
    • Add -Wperformance lints for *Ref boxing and nonlocal return (#9889 by @​som-snytt)

    Language improvements

    • Improve support for Unicode supplementary characters in identifiers and string interpolation (#9805 by @​som-snytt)

    Compiler options

    Security

    • Error on source files with Unicode directional formatting characters (#10017)
    • Prevent Function0 execution during LazyList deserialization (#10118)

    Bugfixes

    • Emit all bridge methods non-final (perhaps affecting serialization compat) (#9976)
    • Fix null-pointer regression in Vector#prependedAll and Vector#appendedAll (#9983)
    • Improve concurrent behavior of Java ConcurrentMap wrapper (#10027 by @​igabaydulin)
    • Preserve null policy in wrapped Java Maps (#10129 by @​som-snytt)

    Changes that shipped in Scala 2.12.16 and 2.12.17 are also included in this release.

    For the complete 2.13.9 change lists, see all merged PRs and all closed bugs.

    Compatibility

    ... (truncated)

    Commits
    • 986dcc1 Merge pull request #10129 from som-snytt/followup/12586-preserve-NPE
    • b824b84 Preserve null policy in wrapped Java Map
    • d578a02 Merge pull request #10128 from SethTisue/revert-10114-10123
    • e5fe919 Revert "Args files are 1 arg per line, fix -Vprint-args -"
    • 362c5d1 Revert "Trim and filter empties in arg files"
    • 864148d Revert "process.Parser strips escaping backslash"
    • f69fe8b Merge pull request #10127 from scalacenter/tasty/support-3.2.0-final
    • 0aa6bd4 remove tasty escape hatch for 3.2.0-RC4
    • af56abc Merge pull request #10123 from som-snytt/dev/814-window-cmd-escapes
    • 7e844a5 Merge pull request #10121 from scala-steward/update/slf4j-nop-2.0.0
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
Releases(v0.8.8)
  • v0.8.8(Apr 5, 2022)

    New Features

    • JaCoCo now officially supports Java 17 and 18 (GitHub #1282, #1198).
    • Experimental support for Java 19 class files (GitHub #1264).
    • Part of bytecode generated by the Java compilers for assert statement is filtered out during generation of report (GitHub #1196).
    • Branch added by the Kotlin compiler version 1.6.0 and above for "unsafe" cast operator is filtered out during generation of report (GitHub #1266).
    • Improved support for multiple JaCoCo runtimes in the same VM (GitHub #1057).

    Fixed bugs

    • Fixed NullPointerException during filtering (GitHub #1189).
    • Fix range for debug symbols of method parameters (GitHub #1246).

    Non-functional Changes

    • JaCoCo now depends on ASM 9.2 (GitHub #1206).
    • Messages of exceptions occurring during analysis or instrumentation now include JaCoCo version (GitHub #1217).
    Source code(tar.gz)
    Source code(zip)
    jacoco-0.8.8.zip(3.78 MB)
  • v0.8.7(May 4, 2021)

    New Features

    • JaCoCo now officially supports Java 15 and 16 (GitHub #1094, #1097, #1176).
    • Experimental support for Java 17 class files (GitHub #1132).
    • New formats parameter for Maven report goals to specify the generated report formats. Contributed by troosan. (GitHub #1175).
    • Branch added by the Kotlin compiler version 1.4.0 and above for "unsafe" cast operator is filtered out during generation of report (GitHub #1143, #1178).
    • synthetic methods added by the Kotlin compiler version 1.5.0 and above for private suspending functions are filtered out (GitHub #1174).
    • Branches added by the Kotlin compiler version 1.4.20 and above for suspending lambdas are filtered out during generation of report (GitHub #1149).
    • Branches added by the Kotlin compiler version 1.5.0 and above for functions with default arguments are filtered out during generation of report (GitHub #1162).
    • Branch added by the Kotlin compiler version 1.5.0 and above for reading from lateinit property is filtered out during generation of report (GitHub #1166).
    • Additional bytecode generated by the Kotlin compiler version 1.5.0 and above for when expressions on kotlin.String values is filtered out during generation of report (GitHub #1172).
    • Improved filtering of bytecode generated by Kotlin compiler versions below 1.5.0 for when expressions on kotlin.String values (GitHub #1156).

    Fixed bugs

    • Fixed parsing of SMAP generated by Kotlin compiler version 1.5.0 and above (GitHub #1164).

    Non-functional Changes

    • JaCoCo now depends on ASM 9.1 (GitHub #1094, #1097, #1153).
    • Maven plug-in has no dependency on maven-reporting-impl any more (GitHub #1121).
    Source code(tar.gz)
    Source code(zip)
    jacoco-0.8.7.zip(3.77 MB)
  • v0.8.6(Sep 15, 2020)

    New Features

    • JaCoCo now officially supports Java 14.
    • Experimental support for Java 15 class files (GitHub #992).
    • Experimental support for Java 16 class files (GitHub #1059).
    • Methods toString, hashCode and equals generated by compiler for records are filtered out during generation of report (GitHub #990).
    • Bridge methods are filtered out during generation of report (GitHub #1010).
    • Methods generated by Kotlin compiler for non-overridden non-abstract methods of interfaces are filtered out during generation of report (GitHub #1012).
    • Branches added by the Kotlin compiler version 1.3.60 for suspending functions with tail call optimization are filtered out during generation of report (GitHub #1016).

    Fixed bugs

    • Compression method of zip entries is now preserved when instrumenting archives. This allows to use JaCoCo with frameworks that expect uncompressed entries (GitHub #1018).

    Non-functional Changes

    • Support for Pack200 was removed in JDK 14. JaCoCo will now throw a detailed exception when Pack200 archives are processed with the latest JDKs (GitHub #984).
    • JaCoCo now depends on ASM 8.0.1 (GitHub #1032, #1043).

    API Changes

    • URLStreamHandlerRuntime removed (GitHub #471).

    All Resolved Issues

    Source code(tar.gz)
    Source code(zip)
    jacoco-0.8.6.zip(3.76 MB)
  • v0.8.5(Oct 12, 2019)

    New Features

    • JaCoCo now officially supports Java 13
    • Experimental support for Java 14 class files (GitHub #897).
    • Branches added by the Kotlin compiler for open functions with default arguments are filtered out during generation of report (GitHub #887).

    Fixed bugs

    • synthetic constructors that contain values of default arguments in Kotlin should not be ignored (GitHub #888).
    • Instrumentation should update indexes of local variables in annotations (GitHub #894).
    • Branches added by the Kotlin compiler for functions with default arguments and containing arguments of type long or double should be filtered out during generation of report (GitHub #908).
    • synthetic methods that contain bodies of anonymous functions in Scala should not be ignored (GitHub #912).
    • To avoid failures with invalid class files report generation now checks that source references are actually files (GitHub #941).
    • NullPointerException during filtering (GitHub #942, #944).

    Non-functional Changes

    • JaCoCo now distributed under the terms and conditions of the Eclipse Public License Version 2.0 (GitHub #943).
    • Prevent startup when JaCoCo runtime cannot be initialized to avoid subsequent faults (GitHub #910).
    • JaCoCo now depends on ASM 7.2 (GitHub #947).

    API Changes

    • The coverage check API and tools (Ant, Maven) now report an error, when a coverage ratio limit is configured outside the range [0,1] to avoid common configuration mistakes (GitHub #783).
    • Unsupported class file versions are now consistently reported as exceptions by all methods of Analyzer and Instrumenter and thus also during report generation and offline instrumentation (GitHub #952).

    All Resolved Issues

    Source code(tar.gz)
    Source code(zip)
    jacoco-0.8.5.zip(3.70 MB)
  • v0.8.4(May 10, 2019)

    New Features

    • JaCoCo now officially supports Java 12.
    • Instrumentation does not add synthetic field to Java 11+ class files, however still adds synthetic method (GitHub #845).
    • Branches added by the Kotlin compiler version 1.3.30 for suspending lambdas and functions are filtered out during generation of report (GitHub #849).

    Fixed bugs

    • Fixed incorrect update of frames caused by bug in ASM library in case of arrays with more than 7 dimensions (GitHub #839).
    • Fixed regression, which was introduced in 0.8.3 - module-info.class should be excluded from analysis to not cause IllegalStateException (GitHub #859).

    API Changes

    • Methods Instrumenter.instrument(org.objectweb.asm.ClassReader) and Analyzer.analyzeClass(org.objectweb.asm.ClassReader) were removed (GitHub #850).

    Non-functional Changes

    • JaCoCo now depends on ASM 7.1 (GitHub #851).

    All Resolved Issues

    Source code(tar.gz)
    Source code(zip)
    jacoco-0.8.4.zip(3.68 MB)
  • v0.8.3(Jan 24, 2019)

    New Features

    • jacoco-maven-plugin now requires at least Maven 3.0 (GitHub #821).
    • JaCoCo now officially supports Java 11 (GitHub #760).
    • Experimental support for Java 13 class files (GitHub #835).
    • Branch added by the Kotlin compiler for "unsafe" cast operator is filtered out during generation of report (GitHub #761).
    • Branch added by the Kotlin compiler for not-null assertion operator is filtered out during generation of report (GitHub #815).
    • Instructions inlined by Kotlin compiler are filtered out during generation of report (GitHub #764).
    • Branches added by the Kotlin compiler for suspending lambdas and functions are filtered out during generation of report (GitHub #802, #803, #809).
    • Classes and methods annotated by annotation whose retention policy is runtime or class and whose simple name contains "Generated" (previously equality was required) are filtered out during generation of report (GitHub #822).
    • HTML report shows message when source file can't be found (GitHub #801).
    • HTML report shows message when class has no debug information (GitHub #818).
    • HTML report shows message when analyzed class does not match executed (GitHub #819).
    • HTML report shows message when no class files specified and when none of the analyzed classes contain code relevant for code coverage (GitHub #833).
    • Empty class and sourcefile nodes are preserved and available in XML report (GitHub #817).
    • Agent avoids conflicts with other agents when running on Java 9+ (GitHub #829).

    Fixed Bugs

    • synthetic methods that contain values of default arguments in Kotlin should not be ignored (GitHub #774).
    • synthetic methods that represent suspend functions in Kotlin should not be ignored (GitHub #804).
    • Removed misleading parameters includes and excludes from dump, merge and restore-instrumented-classes goals of jacoco-maven-plugin, because they have no effect (GitHub #827).

    Non-functional Changes

    • JaCoCo now depends on ASM 7.0 (GitHub #760).

    All Resolved Issues

    Source code(tar.gz)
    Source code(zip)
    jacoco-0.8.3.zip(3.66 MB)
  • v0.8.2(Aug 22, 2018)

    New Features

    • Experimental support for Java 11 and Java 12 class files, including JEP 12 "preview features" (GitHub #719, #738, #743).
    • Branches and instructions generated by javac 11 for try-with-resources statement are filtered out (GitHub #669).
    • Synthetic classes are filtered out during generation of report (GitHub #668).
    • Part of bytecode generated by ECJ for switch statements on java.lang.String values is filtered out during generation of report (GitHub #735, #741, #746).
    • Methods added by the Kotlin compiler that do not have line numbers are filtered out during generation of report. Idea and implementation by Nikolay Krasko (GitHub #689).
    • Branch added by the Kotlin compiler for reading from lateinit property is filtered out during generation of report. Implementation by Fabian Mastenbroek (GitHub #707).
    • Bytecode generated by Kotlin compiler for implicit else of when expressions that list all cases of enum or sealed class is filtered out during generation of report (GitHub #721, #729, #749).
    • Additional bytecode generated by Kotlin compiler for when expressions on kotlin.String values is filtered out during generation of report (GitHub #737, #746).
    • Classes and methods annotated with annotation whose retention policy is runtime or class and whose simple name is Generated are filtered out during generation of report (GitHub #731).
    • Maven goal report-aggregate now also considers dependencies specified using version range. Idea and implementation by Lukas Krejc (GitHub #658).

    Fixed Bugs

    • Don't insert stackmap frames into class files with version < 1.6, this fixes regression which was introduced in version 0.6.5 (GitHub #667).
    • Question mark in filter expressions now correctly matches exactly one character (GitHub #672).
    • Part of bytecode that javac generates for switch statement on java.lang.String values with a small number cases is now correctly filtered out during generation of report (GitHub #730).

    Non-functional Changes

    • JaCoCo now depends on ASM 6.2.1 (GitHub #706, #725).
    • Improved error message when already instrumented classes are used for instrumentation or analysis (GitHub #703).
    • JaCoCo build now requires at least Maven 3.3.9 and JDK 8 (GitHub #711). API Changes
    • The XML report now has an optional attribute sourcefilename on the class element to allow unambiguously relate classes to source files. The JaCoCo DTD version has been updated to 1.1 (GitHub #702).

    All Resolved Issues

    Source code(tar.gz)
    Source code(zip)
    jacoco-0.8.2.zip(3.55 MB)
  • v0.8.1(Mar 22, 2018)

  • v0.8.0(Jan 3, 2018)

    New Features

    • JaCoCo now officially supports Java 9 (GitHub #600).
    • JaCoCo now comes with a simple command line interface (GitHub #525).
    • Limit configuration of Maven check goal and Ant check element now also supports percentage values (GitHub #534).
    • Manifests of JAR files now have Automatic-Module-Name for Java 9 (GitHub #565).
    • Maven aggregated reports will now also include modules of runtime and provided dependencies (GitHub #498, #572).

    During creation of reports various compiler generated artifacts are filtered out, which otherwise require unnecessary and sometimes impossible tricks to not have partial or missed coverage:

    • Methods valueOf and values of enum types (GitHub #491).
    • Private empty no-argument constructors (GitHub #529).
    • Methods annotated with @lombok.Generated to better integrate with Lombok >= 1.16.14. Initial analysis and contribution by Rüdiger zu Dohna (@t1) (GitHub #513).
    • Methods annotated with @groovy.transform.Generated to better integrate with Groovy >= 2.5.0. Thanks to Andres Almiray (@aalmiray) for adding the annotation to Groovy (GitHub #610).
    • Part of bytecode for synchronized blocks (GitHub #501).
    • Part of bytecode for try-with-resources statements (GitHub #500).
    • Part of bytecode for finally blocks (GitHub #604).
    • Part of bytecode for switch statements on java.lang.String values (GitHub #596).

    Note: Tools that directly read exec files and embed JaCoCo for this (such as SonarQube or Jenkins) will provide filtering functionality only after they updated to this version of JaCoCo.

    Fixed Bugs

    • Fixed bug in instrumentation of exception handlers, which was causing damage of structured locking in certain situations and as consequence poor performance of instrumented methods, analysis and fix contributed by Allen Hair (@allenhair) (GitHub #627).
    • dump commands now report error when server unexpectedly closes connection without sending response (GitHub #538).
    • Reduced chance of conflict with other agents (GitHub #555).
    • Restored Maven help goal that was missing in version 0.7.9 (GitHub #559).
    • NullPointerException during offline instrumentation of module-info.class (GitHub #600, GitHub #634).
    • Incorrect update of frames caused by bug in ASM library (GitHub #600).
    • Loss of InnerClasses attribute caused by bug in ASM library (GitHub #600).
    • NegativeArraySizeException during instrumentation caused by bug in ASM library (GitHub #600).

    Non-functional Changes

    • JaCoCo now depends on ASM 6.0 (GitHub #600).
    • More information about context is provided when unable to read input during instrumentation (GitHub #527).
    • More information about context is provided when unable to read stream during analysis (GitHub #541).

    All Resolved Issues

    Source code(tar.gz)
    Source code(zip)
    jacoco-0.8.0.zip(3.37 MB)
  • v0.7.9(Feb 6, 2017)

    Fixed Bugs

    • "java.lang.ClassFormatError: Short length on BootstrapMethods in class file" caused by bug in ASM library (GitHub #462).
    • Do not recompute frames in case of large methods, otherwise java.lang.ClassNotFoundException might be thrown (GitHub #177).
    • ExecutionDataWriter.FORMAT_VERSION is not a compile-time constant (GitHub #474).
    • Maven goal "prepare-agent" should not overwrite existing property value if execution was skipped (GitHub #486).

    API Changes

    • JaCoCo.ASM_API_VERSION removed (GitHub #474).

    Non-functional Changes

    • JaCoCo now depends on ASM 5.2.
    • OSGi metadata now generated automatically and additionally include uses directives, Require-Capability attribute, and export of all internal packages with x-internal:=true directive (GitHub #211).
    • Removed OSGi attributes that were mistakenly added in version 0.6.1 into jacocoant.jar that contains all dependencies (GitHub #211).

    All Resolved Issues

    Source code(tar.gz)
    Source code(zip)
    jacoco-0.7.9.zip(2.81 MB)
  • v0.7.8(Dec 11, 2016)

    New Features

    • User property jacoco.dataFile for parameter dataFile of Maven report goal (GitHub #322).

    Fixed Bugs

    • Use RoundingMode#FLOOR instead of RoundingMode#HALF_EVEN for percentages in HTML report, so that "99.5" is displayed as "99%", not as "100%" (GitHub #452).
    • Do not add useless members into Java 8 interfaces that have only interface initialization and abstract methods (GitHub #441).
    • Fix instrumentation to not violate Java Virtual Machine Specification regarding initialization of final fields, otherwise IllegalAccessError will be thrown starting from OpenJDK 9 EA b127 (GitHub #434).
    • Fix instrumentation of interfaces with default methods to not create incorrect constant pool entries, which lead to IncompatibleClassChangeError starting from OpenJDK 9 EA b122 (GitHub #428).
    • Add Maven goal report-aggregate to lifecycle-mapping-metadata.xml (GitHub #427).

    Non-functional Changes

    • Released JaCoCo JARs are not signed any more. Signed versions of JaCoCo are now available from the Eclipse Orbit project (GitHub #466).
    • Simplified numbering of versions - JaCoCo JARs in Maven Central repository do not have qualifier any more (GitHub #468).

    All Resolved Issues

    Source code(tar.gz)
    Source code(zip)
    jacoco-0.7.8.zip(2.80 MB)
  • v0.7.7(Jun 6, 2016)

    New Features

    • New Maven goal report-aggregate to create reports for multi-module projects (GitHub #388).
    • New parameters title and footer for Maven reporting goals allow customization of generated reports.
    • Renamed "dot" resources in generated HTML reports to become more web hosting friendly (GitHub #401).
    • Experimental support for Java 9 class files (GitHub #406).

    Fixed Bugs

    • Don't suppress EOF errors in case of truncated execution data files (GitHub #397).

    Non-functional Changes

    • Empty probe arrays are not written to execution data files any more. This reduces exec file size significantly for per-test data dumps. (GitHub #387).
    • More information about context is provided when unable to read input during analysis. (GitHub #400).
    • Require at least Maven 3.0 for build of JaCoCo.

    All Resolved Issues

    Source code(tar.gz)
    Source code(zip)
    jacoco-0.7.7.201606060606.zip(2.87 MB)
  • v0.7.6(Feb 18, 2016)

    New Features

    • New agent option inclnolocationclasses to support execution environments like Android where no source location is provided with classes (GitHub #288).
    • Improved error message in case of incompatible execution data files. (GitHub #319).
    • Command line agent options now supports comma in file names. Contributed by Jochen Berger. (GitHub #358).

    Fixed Bugs

    • Fix MBeanClient example (GitHub #333).
    • Avoid ConcurrentModificationException during shutdown (GitHub #364).

    API Changes

    • In case of incompatible execution data formats read from another JaCoCo version ExecutionDataReader.read() now throws a IncompatibleExecDataVersionException.

    Non-functional Changes

    • JaCoCo now depends on ASM 5.0.4.

    All Resolved Issues

    Source code(tar.gz)
    Source code(zip)
    jacoco-0.7.6.201602180812.zip(2.91 MB)
  • v0.7.5(May 25, 2015)

    New Features

    • Better detection of coverage in code blocks with implicit exceptions. (GitHub #310).
    • Added lifecycle-mapping-metadata.xml for M2E (GitHub #203).
    • Allow locales with country and variant for Ant report task (GitHub #289).

    Fixed Bugs

    • For the Ant tasks coverage and agent the destfile attribute is now passed as an absolute path also in the default case (GitHub #301).

    API Changes

    • The exec file version has been updated and is not compatible with previous versions.

    All Resolved Issues

    Source code(tar.gz)
    Source code(zip)
    jacoco-0.7.5.201505241946.zip(2.90 MB)
  • v0.7.4(Feb 27, 2015)

  • v0.7.3(Feb 22, 2015)

    New Features

    • For offline instrumemtation agent configuration supports system properties replacements. Implementation based on pull request of GitHub user 'debugger' (GitHub #262).
    • Exclude dynamically generated classes from instrumentation for better interoperability with JMockit, analysis contributed by Rogério Liesenfeld (GitHub #272).

    Fixed Bugs

    • Instrumented bytecode now compatible with Android ART runtime, analysis and fix contributed by Allen Hair (GitHub #265).

    All Resolved Issues

    Source code(tar.gz)
    Source code(zip)
    jacoco-0.7.3.201502191951.zip(2.92 MB)
  • v0.7.2(Sep 13, 2014)

  • v0.7.1(May 11, 2014)

  • v0.7.0(Mar 19, 2014)

  • v0.6.5(Mar 5, 2014)

    New Features

    • Warnings are logged during report generation if different versions of classes are used than at runtime (GitHub #185).
    • Signatures are removed from instrumented JAR files (GitHub #186).

    Fixed Bugs

    • Skip jacoco instrumentation for mvn modules with package type ear (GitHub #169).
    • Align skip conditions and messages for Maven goals and give reasons. This includes removal of the specific skip condition for packages e.g. POMs and instead checks existence of target/classes in appropriate goals (GitHub #171).
    • GitHub #44: (Regression) Agent Mojo should set empty property, if execution was skipped (GitHub #192).

    API Changes

    • Restrict visibility of methods in abstract classes of jacoco-maven-plugin (GitHub #175).

    All Resolved Issues

    Source code(tar.gz)
    Source code(zip)
    jacoco-0.6.5.201403032054.zip(2.57 MB)
  • v0.6.4(Dec 11, 2013)

    New Features

    • Support for Android Strict Mode (GitHub #113).
    • New dump Mojo for Maven plug-in (GitHub #107).
    • New merge Mojo for Maven plug-in, contributed by Mads Mohr Christensen (GitHub #126).
    • Additional list of source files for every package in HTML report (GitHub #142).
    • Additional report-integration and prepare-agent-integration goals for integration tests. (GitHub #152, #161).

    Fixed Bugs

    • Multiple executions of Maven goal prepare-agent should not lead to incorrect configuration (GitHub #40).
    • Avoid direct dependency on java.lang.management APIs to allow usage on Android (GitHub #150).
    • All JaCoCo Maven goals are marked as thread-safe (GitHub #133).
    • check and merge goal failures in jacoco-maven-plugin with Maven 2.2.1 due to incompatible configuration (GitHub #129).

    API Changes

    • New API package org.jacoco.core.tools for shared high-level tools. (GitHub #159).

    All Resolved Issues

    Source code(tar.gz)
    Source code(zip)
    jacoco-0.6.4.201312101107.zip(2.52 MB)
  • v0.6.3(Sep 1, 2013)

    New Features

    • Support for archives in Pack200 format (GitHub #91).
    • The coverage check has been reworked to allow checks on all counter values on all element types (GitHub #106).
    • Coverage checks are now also available in Ant (GitHub #106).

    Fixed Bugs

    • Fixed inconsistent stackmap frames when instrumenting class files produced by certain tools like ProGuard (GitHub #85).

    Non-functional Changes

    • More context information when exceptions occur during analysis or instrumentation (GitHub #104).
    • If analysis is performed on offline instrumented classes - which is an build configuration error - an exception is now thrown (GitHub #108).

    API Changes

    • The configuration of the Maven check goal has been reworked to support checks on any element type (GitHub #106).
    • Analyzer and Instrumenter expect resource name as additional parameter for better error messages (GitHub #104).

    All Resolved Issues

    Source code(tar.gz)
    Source code(zip)
    jacoco-0.6.3.201306030806.zip(2.40 MB)
  • v0.6.2(Sep 1, 2013)

    New Features

    • Support for offline instrumentation (GitHub #4, #64). JaCoCo agent exposes runtime API for direct integration with application under test (GitHub #61).
    • Support for parallel test execution: Different agents can now safely write to the same *.exec file (GitHub #52).
    • New output mode 'none' can be used when agent is only controlled via JMX or its new runtime API (GitHub #63).
    • Better error message in case of invalid stackmap frames (GitHub #73).
    • jacoco-maven-plugin: default phase for goal "report" - "verify" (GitHub #72).

    Non-functional Changes

    • For every build the corresponding Git commit hash is included as Eclipse-SourceReferences manifest headers (GitHub #7, #59).
    • Adjust saturation of red source highlighting in HTML reports to make JaCoCo reports more accessible to red/green blind users.

    API Changes

    • The output mode mbean of the agent has been dropped in favor of the new boolean option jmx. This allows to combine JMX access with any other output mode (GitHub #62).

    All Resolved Issues

    Source code(tar.gz)
    Source code(zip)
    jacoco-0.6.2.201302030002.zip(2.32 MB)
  • v0.6.1(Sep 1, 2013)

  • v0.6.0(Sep 1, 2013)

    New Features

    • Full support for Java 7 including INVOKEDYNAMIC as JaCoCo is now based on ASM 4.0 (GitHub #5).

    Fixed Bugs

    • Maven plugin should skip creation of report if the execution data file is missing. This avoids appearance of stack traces in case when JVM was not forked, e.g. if there are no tests to run (SF #3563431, GitHub #19).
    • Maven plugin should fail if unable to read execution data file or create report (GitHub #19).

    API Changes

    • Only colon as separator character supported in agent parameters. The deprecated pipe character is no longer supported.

    All Resolved Issues

    Source code(tar.gz)
    Source code(zip)
    jacoco-0.6.0.201210061924.zip(3.17 MB)
  • v0.5.10(Sep 1, 2013)

  • v0.5.9(Sep 1, 2013)

  • v0.5.8(Sep 1, 2013)

    New Features

    • Support for parallel Maven builds (Trac 191).
    • New agent option classdumpdir to dump all class files seen by the JaCoCo agent to disk. This option is also available for Ant and Maven (Trac 208).

    Fixed Bugs

    • Allow instrumentation of classes with dead code (SF 3538112).
    • Reworked instrumentation strategy to avoid verifier error "Uninitialized object exists on backward branch" with certain Java 7 class files (Trac 154).

    Non-functional Changes

    • Documentation now includes Maven example and Maven goal documentation (Trac 201, 202).
    Source code(tar.gz)
    Source code(zip)
    jacoco-0.5.8.201207111220.zip(2.21 MB)
  • v0.5.7(Sep 1, 2013)

    New Features

    • Support for class redefinitions by other agents like JMockit (SF 3509409).
    • Remove class file attributes with invalid code offsets caused by other byte code processing tools to avoid verifier errors (Trac 196).
    • Improved logging for Ant tasks (SF 3518429).

    Fixed Bugs

    • In case of failures the agent should log the original exception.
    Source code(tar.gz)
    Source code(zip)
    jacoco-0.5.7.201204190339.zip(2.13 MB)
  • v0.5.6(Sep 1, 2013)

    New Features

    • jacoco-maven-plugin can be used together with maven-site-plugin (Trac 181).
    • The report Ant task now also supports directory resources to specify source folders. This allows reading source files from multiple directories. Contributed by Dominik Stadler (Trac 119).

    Fixed Bugs

    • Don't insert stackmap frames for class files before version 1.6.
    • Regression, which was introduced in 0.5.4 - restored compatibility of jacoco-maven-plugin with Maven 2 (Trac 182).
    Source code(tar.gz)
    Source code(zip)
    jacoco-0.5.6.201201232323.zip(2.12 MB)
Owner
Java Code Coverage Tools
Java Code Coverage Tools
Auto-Unit-Test-Case-Generator automatically generates high-level code-coverage JUnit test suites for Java, widely used within the ANT Group.

中文README传送门 What is Auto-Unit-Test-Case-Generator Auto-Unit-Test-Case-Generator generates JUnit test suites for Java class just as its name. During te

TRaaS 108 Dec 22, 2022
Jazzer is a coverage-guided, in-process fuzzer for the JVM platform developed by Code Intelligence

Jazzer is a coverage-guided, in-process fuzzer for the JVM platform developed by Code Intelligence. It is based on libFuzzer and brings many of its instrumentation-powered mutation features to the JVM.

Code Intelligence 696 Jan 5, 2023
cglib - Byte Code Generation Library is high level API to generate and transform Java byte code. It is used by AOP, testing, data access frameworks to generate dynamic proxy objects and intercept field access.

cglib Byte Code Generation Library is high level API to generate and transform JAVA byte code. It is used by AOP, testing, data access frameworks to g

Code Generation Library 4.5k Jan 8, 2023
vʌvr (formerly called Javaslang) is a non-commercial, non-profit object-functional library that runs with Java 8+. It aims to reduce the lines of code and increase code quality.

Vavr is an object-functional language extension to Java 8, which aims to reduce the lines of code and increase code quality. It provides persistent co

vavr 5.1k Jan 3, 2023
Team 5468's 2022 FRC robot code. This code is written in Java and is based off of WPILib's Java control system and utilizes a command based system

FRC 2022 Team 5468's 2022 FRC robot code. This code is written in Java and is based off of WPILib's Java control system and utilizes a command based s

null 4 Oct 4, 2022
Code metrics for Java code by means of static analysis

CK CK calculates class-level and method-level code metrics in Java projects by means of static analysis (i.e. no need for compiled code). Currently, i

Maurício Aniche 286 Jan 4, 2023
mobsfscan is a static analysis tool that can find insecure code patterns in your Android and iOS source code.

mobsfscan is a static analysis tool that can find insecure code patterns in your Android and iOS source code. Supports Java, Kotlin, Swift, and Objective C Code. mobsfscan uses MobSF static analysis rules and is powered by semgrep and libsast pattern matcher.

Mobile Security Framework 347 Dec 29, 2022
Business Application Platform - no-code/low-code platform to build business applications

Orienteer What is Orienteer Orienteer is Business Application Platform: Easy creation of business applications Extendable to fit your needs Dynamic da

Orienteer 189 Dec 6, 2022
This template makes it easy to organize FTC code and allows for the Autonomous and TeleOp periods to share code.

FTC Code Organizer This template created by team 19458 Equilibrium.exe makes it easy to keep your code organized and allows the Autonomous and TeleOp

FTC 19458 Equilibrium.exe 5 Nov 10, 2022
Inria 1.4k Dec 29, 2022
Duck Library is a library for developers who don't want to spend their time to write same library consistently.

Duck Library is a library for developers who don't want to spend their time to write same library consistently. It has almost every useful feature to

null 5 Jul 28, 2022
A low intrusive, configurable android library that converts layout XML files into Java code to improve performance

qxml English 一个低侵入,可配置的 Android 库,用于将 layout xml 文件转换为 Java 代码以提高性能。 与X2C的对比 X2C: 使用注解处理器生成View类,使用时需要在类中添加注解,并替换setContentView方法,侵入性较强; 对于布局属性的支持不够完美

null 74 Oct 6, 2022
Java library for parsing report files from static code analysis.

Violations Lib This is a Java library for parsing report files like static code analysis. Example of supported reports are available here. A number of

Tomas Bjerre 127 Nov 23, 2022
Java serialization library, proto compiler, code generator

A java serialization library with built-in support for forward-backward compatibility (schema evolution) and validation. efficient, both in speed and

protostuff 1.9k Dec 23, 2022
A library for IDEs and Code Editors to compile java projects faster dynamically

A library for IDEs and Code Editors to compile java projects faster dynamically

omega ui 2 Feb 22, 2022
ORM16 is a library exploring code generation-based approach to ORM for Java 17 and focusing on records as persistent data model

About ORM16 ORM16 is a library exploring code generation-based approach to ORM for Java 17 and focusing on records as persistent data model. Example I

Ivan Gammel 1 Mar 30, 2022
A JavaFX library that allows Java2D code (Graphics2D) to be used to draw to a Canvas node.

FXGraphics2D Version 2.1, 3 October 2020. Overview FXGraphics2D is a free implementation of Java's Graphics2D API that targets the JavaFX Canvas. It m

David Gilbert 184 Dec 31, 2022
CodeSheriff is a simple library that helps you in writing JUnit tests that check the quality of your code

CodeSheriff is a simple library that helps you in writing JUnit tests that check the quality of your code. For example, CodeSheriff may fail because you have methods in your code that have more than X lines of code, or that have complexity greater than Y.

Maurício Aniche 62 Feb 10, 2022