jonathanlermitage / tikione-jacocoverage

NetBeans module that provides JaCoCo code coverage for Ant based Java SE, Java EE and NetBeans Module projects (JDK5,6,7,8 compatible).
http://plugins.netbeans.org/plugin/48570/?show=true
Apache License 2.0
27 stars 25 forks source link

Test With JaCoCo does not work on very large projects. #26

Closed Ursus-B closed 8 years ago

Ursus-B commented 9 years ago

Hi, I've recently discoverd this plugin, and would really like to use it for my Junit test cases, but I've come across an issue. When I try to Test with JaCoCo on a large project (like 5400 java files), it fails before running any tests with an error:

Forked Java VM exited abnormally. Please note the time in the report does not reflect the time until the VM exit. 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.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)

The same procedure works flawlessly on a much smaller project with only about 300 files. I suspect that the argument list is too long for ANT to fork another JVM. Can you point me to a solution, or is this a bug in JaCoCoverage?

jonathanlermitage commented 9 years ago

Hi, I'll proceed to some tests with very large projects asap. Also, how many Java packages have you got? The plugin adds them to the JaCoCo JavaAgent's parameters. A very big list could effectively lead to a failure. Normally, if you don't filter by package name I pass the ".*" parameter instead the full list of packages: I guess we've found a bug :)

Ursus-B commented 9 years ago

Hi, I performed a search in the log text, and got 564 distinct packages.So quite a lot of packages! The project is a ten year old product that has been very actively developed, and not so actively refactored into modules. The Netbeans project is a "with existing sources" project, meaning that I don't manage its ANT scripts manually, Netbeans generates them for me.

jonathanlermitage commented 9 years ago

Thx for the details.

I've uploaded a patch to limit the size of the packages list. If if exceeds 1000 characters, it will be replaced by a "*" to process all packages. The release is available for download at: https://github.com/jonathanlermitage/tikione-jacocoverage/releases/download/v1.5.1.beta/jacocoverage-1.5.1.beta.nbm.zip

Could you test it with your project? Thank you v. much.

Ursus-B commented 9 years ago

Thanks! I’ll test as soon as possible, probably within three hours. I’ll report back when I’ve tested it.

From: Jonathan Lermitage [mailto:notifications@github.com] Sent: den 28 januari 2015 20:04 To: jonathanlermitage/tikione-jacocoverage Cc: Olsson, Björn (OS Sweden AM) Subject: Re: [tikione-jacocoverage] Test With JaCoCo does not work on very large projects. (#26)

Thx for the details.

I've uploaded a patch to limit the size of the packages list. If if exceeds 1000 characters, it will be replaced by a "*" to process all packages. The release is available for downlload at: https://github.com/jonathanlermitage/tikione-jacocoverage/releases/download/v1.5.1.beta/jacocoverage-1.5.1.beta.nbm.zip

Could you test it with your project? Thank you v. much.

— Reply to this email directly or view it on GitHubhttps://github.com/jonathanlermitage/tikione-jacocoverage/issues/26#issuecomment-71894408.

Ursus-B commented 9 years ago

The new update works like a charm! No hickups whatsoever. I tested it on my huge project as well as the smaller ones, and works as expected. I recommend an official release.

But the JaCoCoverage Collection Task runs forever on my large project, and for a very long time on my smaller ones. Why is this? And why can't I cancel them? They keep running even after the report has been generated.