Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

JaCoCo and JMockit

Anonymous
2012-02-29
2013-04-24

  • Anonymous
    2012-02-29

    Hallo!

    I'm using JMockit (jmockit-0.9.9.9.11) and want to coverage this project using JaCoCo. The tests run fine without JaCoCo. As soon as I add JaCoCo I get the following problem:

    junit.framework.AssertionFailedError: Forked Java VM exited abnormally. Please note the time in the report does not reflect the time until the VM exit.
        at org.jacoco.ant.CoverageTask.execute(CoverageTask.java:95)
    

    Any ideas what could cause this problem?
    Thanks

     
  • Where does stdout/stderr of the forked JVM go to in your configuration? The you should find some additional hints.

     

  • Anonymous
    2012-02-29

    Unfortunately there is not much to see in the STDOUT:

    Enhancing junit with coverage.
         Running com.sample.AllSampleTests
         Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 19
         at org.junit.runner.notification.RunNotifier.access$000(RunNotifier.java:19)
         at org.junit.runner.notification.RunNotifier$SafeNotifier.run(RunNotifier.java:38)
         at org.junit.runner.notification.RunNotifier.fireTestFailure(RunNotifier.java:97)
         at org.junit.internal.runners.model.EachTestNotifier.addFailure(EachTestNotifier.java:26)
         at org.junit.runners.ParentRunner.run(ParentRunner.java:311)
         at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39)
         at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:420)
         at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:911)
         at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:768)

     
  • This looks really strange. Would it be possible to provide a minimal reproducer?

    Thx,
    -marc

     

  • Anonymous
    2012-03-01

    Hallo!

    I have now written a minimal reproducing eclipse project consisting only as a simple hello world test and a mock. Additionally an Ant script that compiles and tries to coverage the test is provided. How can I send you the files?

    Thx
    charlie

     
  • Great! Please open a tracker item here as SF and attach the reproducer as a ZIP.

     

  • Anonymous
    2012-03-14

    Hallo!

    Do you have any new leads on this or the tracker ticket?

    Thx

     
  • Thanks for the reminder. I'm very sorry this issue somehow slipped away from. I just downloaded your complete reproducer and will analyze it.