Open makiam opened 5 years ago
It works for me. Can you share a project with which I can reproduce your issue? Also, I have found the code coverage window in NB a little fragile. So, you might want to close the report window and reopen.
Still not works for me I used this sample application: https://github.com/gradle/gradle/tree/master/subprojects/docs/src/samples/testing/jacoco/quickstart/groovy Also I see this exception in IDE log exception.txt
Given the error message, I assume you are using Russian locale. It is just a guess, but that might have something to do with the issue. Can you attach the report.dtd and jacocoTestReport.xml referenced in the error message?
Looking it a little more, it is probably not simply because of the locale but because the public ID of the dtd is not -//JACOCO//DTD Report 1.0//EN (I assume it is not EN but RU or something). Which version of NB are you using (or rather which version of this plugin)?
Also, just in case: Can you send me your jacocoTestReport.xml?
I using the latest Netbeans dev build. Means I clone repository and build NB from sources.
I founв that exception is throwns when I set xml.enabled true. But *.dtd file is really missing jacocoTestReport.zip
Thanks, the issue had nothing to do with the locale. Actually, the version of Jacoco DTD has changed. This issue should now be fixed in master. Can you verify?
See other Exception now:
INFO [org.netbeans.gradle.project.coverage.GradleCoverageProvider]: Could not parse E:\Temp\quickstart\build\customJacocoReportDir\test\jacocoTestReport.xml
java.lang.NullPointerException
at java.net.URL.
FYI: test project repository: https://github.com/makiam/quickstart
I have messed up the extensions. It should work now.
It works now, Amazing. Thanks a lot!
BTW. Is it possible to customize class coverage view colors? I see the jacoco coverage plugin for NB ant based projects. It offer to customize such colors for covered/partial/not covered lines. Also it can to show tooltip at gutter with covered/partial/not covered text
This plugin just provides the meta-data of the code coverage and not the UI. So, there is only what NB provides for it. I assume you are talking about the TikiOne plugin. I will have to look at its source to check what it does to make this configurable.
I took a quick look at that plugin and it seems, it manages these highlights itself unlike this plugin. So, I think you should ask the NB team to make code coverage highlights customizable (you can refer to the org-netbeans-modules-gsf-codecoverage library, which is what is used by this plugin).
Jacoco Code coverage report integration seems now work. Steps to reproduce: Run NB IDE with plugin Open some gradle project (Ex, I use samples/testing/jacoco/quickstart/groovy from gradle samples) From project context menu invoke Code Coverage -> Show Report In Report window click Run All Tests In output I see test and jacocoTestReport tasks executed and I can see report under /build/jacocoHtml folder but not in report window nor coverage over source code
I used a latest NB build (build from sources on my own) and JDK 1.8 update 152 x64