Giter Club home page Giter Club logo

tikione-jacocoverage's Introduction

tikione-jacocoverage's People

Contributors

jlahoda avatar jonathanlermitage avatar waffle-iron avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tikione-jacocoverage's Issues

Replace JaCoCo Java agent by Ant task

Rework the JaCoCoverage core module: use JaCoCo Ant task instead of Java agent, to facilitate support of many features (run and test single file, etc.).

Error while tests fail

Hi, I've been using it for my education several times. I'm not sure whether this is a bug or if it's supposed to be this way, is when a test fails, I receive this error:

error

Thanks in advance

Comma in project parent directory

I have Netbeans 7.3 projects that are version controlled by a configuration management tool that likes to put commas in the path above the Netbeans project. I cannot, however, use the "Test with JaCoCoverage" on projects that have a common in the project's parent directory because an exception gets thrown.

I was able to reproduce the problem as follows:

  1. I created a simple HelloWorld project in Netbeans.
  2. I verified that I could successfully "Test with JaCoCoverage".
  3. I closed the project.
  4. I moved the project directory under a parent directory called "HelloWorld,Comma"
  5. I opened the moved project in Netbeans.
  6. I verified that the moved project built and ran fine.
  7. But when I selected to "Test with JaCoCoverage", I got the following error:

Exception in thread "main" java.lang.reflect.InvocationTargetException
FATAL ERROR in native method: processing of -javaagent failed
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:323)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:338)
Caused by: java.lang.IllegalArgumentException: Invalid agent option syntax "includes=helloworld.:helloworld.sayhello.,destfile=/home/glsolaria/NetBeansProjects/HelloWorld,Comma/HelloWorld/jacoco.exec".
at org.jacoco.agent.rt.internal_9dd1198.core.runtime.AgentOptions.(AgentOptions.java:190)
at org.jacoco.agent.rt.internal_9dd1198.PreMain.premain(PreMain.java:43)
... 6 more
Testsuite: helloworld.sayhello.SayHelloTest
Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec

I suspect the comma in the absolute path of "destfile" to AgentOptions is causing a problem. Unfortunately I cannot change the closed-source configuration management tool to not use commas in the path. I don't know if this comes from this plugin or from some other library so any guidance you can give me would be greatly appreciated.

java.util.MissingResourceException: Can't find resource for bundle org.openide.util.NbBundle$PBundle, key AdvancedOption_DisplayName_JaCoCoverage

Exception if -ea switch is enabled:

java.util.MissingResourceException: Can't find resource for bundle org.openide.util.NbBundle$PBundle, key AdvancedOption_DisplayName_JaCoCoverage
at java.util.ResourceBundle.getObject(ResourceBundle.java:374)
[catch] at org.netbeans.core.startup.layers.BinaryFS$AttrImpl.getValue(BinaryFS.java:719)
at org.netbeans.core.startup.layers.BinaryFS$BFSBase.getAttribute(BinaryFS.java:549)
at org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:944)
at org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:877)
at org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:940)
at org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:877)
at org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:798)
at org.netbeans.core.startup.layers.BinaryFS$FileMap.get(BinaryFS.java:1128)
at org.netbeans.spi.options.AdvancedOption.createSubCategory(AdvancedOption.java:139)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.netbeans.core.startup.layers.BinaryFS$AttrImpl$MethodAndParams.invoke(BinaryFS.java:773)
at org.netbeans.core.startup.layers.BinaryFS$AttrImpl.getValue(BinaryFS.java:703)
at org.netbeans.core.startup.layers.BinaryFS$BFSBase.getAttribute(BinaryFS.java:549)
at org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:944)
at org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:877)
at org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:940)
at org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:877)
at org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:798)
at org.openide.loaders.InstanceDataObject$Ser.instanceCreate(InstanceDataObject.java:1398)
at org.openide.loaders.InstanceDataObject.instanceCreate(InstanceDataObject.java:846)
at org.openide.loaders.FolderLookup$ICItem.getInstance(FolderLookup.java:597)
at org.netbeans.modules.options.TabbedController.readPanels(TabbedController.java:323)
at org.netbeans.modules.options.TabbedController.(TabbedController.java:116)
at org.netbeans.modules.options.OptionsCategoryImpl.create(OptionsCategoryImpl.java:120)
at org.netbeans.modules.options.CategoryModel$Category.create(CategoryModel.java:378)
at org.netbeans.modules.options.CategoryModel$Category.getLookup(CategoryModel.java:438)
at org.netbeans.modules.options.CategoryModel$Category.access$000(CategoryModel.java:321)
at org.netbeans.modules.options.CategoryModel$1.run(CategoryModel.java:97)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1432)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2044)
CONFIG [null]: Missing resource from class: org.openide.util.NbBundle$PBundle
CONFIG [null]: Key which was not found: AdvancedOption_DisplayName_JaCoCoverage
SEVERE [org.openide.util.RequestProcessor]: Error in RequestProcessor org.netbeans.modules.options.CategoryModel$1
java.lang.AssertionError: Display name not defined: OptionsDialog/Java/fr-tikione-jacocoverage-plugin-config-JaCoCoverageOptionsPanelController
at org.netbeans.modules.options.TabbedController.readPanels(TabbedController.java:330)
at org.netbeans.modules.options.TabbedController.(TabbedController.java:116)
at org.netbeans.modules.options.OptionsCategoryImpl.create(OptionsCategoryImpl.java:120)
at org.netbeans.modules.options.CategoryModel$Category.create(CategoryModel.java:378)
at org.netbeans.modules.options.CategoryModel$Category.getLookup(CategoryModel.java:438)
at org.netbeans.modules.options.CategoryModel$Category.access$000(CategoryModel.java:321)
at org.netbeans.modules.options.CategoryModel$1.run(CategoryModel.java:97)
Caused: org.openide.util.RequestProcessor$SlowItem: task failed due to
at org.openide.util.RequestProcessor$Task.schedule(RequestProcessor.java:1473)
at org.netbeans.modules.options.CategoryModel$2.run(CategoryModel.java:119)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1432)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2044)
SEVERE [org.openide.util.RequestProcessor]: Error in RequestProcessor org.netbeans.modules.options.CategoryModel$1
java.lang.AssertionError: Display name not defined: OptionsDialog/Java/fr-tikione-jacocoverage-plugin-config-JaCoCoverageOptionsPanelController
at org.netbeans.modules.options.TabbedController.readPanels(TabbedController.java:330)
at org.netbeans.modules.options.TabbedController.(TabbedController.java:116)
at org.netbeans.modules.options.OptionsCategoryImpl.create(OptionsCategoryImpl.java:120)
at org.netbeans.modules.options.CategoryModel$Category.create(CategoryModel.java:378)
at org.netbeans.modules.options.CategoryModel$Category.getLookup(CategoryModel.java:438)
at org.netbeans.modules.options.CategoryModel$Category.access$000(CategoryModel.java:321)
at org.netbeans.modules.options.CategoryModel$1.run(CategoryModel.java:97)
Caused: org.openide.util.RequestProcessor$SlowItem: task failed due to
at org.openide.util.RequestProcessor$Task.schedule(RequestProcessor.java:1473)
at org.netbeans.modules.options.CategoryModel$2.run(CategoryModel.java:119)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1432)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2044)
INFO [org.netbeans.modules.extbrowser]: Cannot detect Mozilla : org.netbeans.modules.extbrowser.NbBrowserException: RegOpenKeyEx() failed for SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\MOZILLA.exe.
SEVERE [global]
java.lang.AssertionError: Display name not defined: OptionsDialog/Java/fr-tikione-jacocoverage-plugin-config-JaCoCoverageOptionsPanelController
at org.netbeans.modules.options.TabbedController.readPanels(TabbedController.java:330)
at org.netbeans.modules.options.TabbedController.(TabbedController.java:116)
at org.netbeans.modules.options.OptionsCategoryImpl.create(OptionsCategoryImpl.java:120)
at org.netbeans.modules.options.CategoryModel$Category.create(CategoryModel.java:378)
at org.netbeans.modules.options.CategoryModel$Category.getComponent(CategoryModel.java:426)
at org.netbeans.modules.options.OptionsPanel.setCurrentCategory(OptionsPanel.java:252)
at org.netbeans.modules.options.OptionsPanel.access$200(OptionsPanel.java:124)
at org.netbeans.modules.options.OptionsPanel$CategoryButton.mouseReleased(OptionsPanel.java:1073)
at java.awt.Component.processMouseEvent(Component.java:6297)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3275)
at java.awt.Component.processEvent(Component.java:6062)
at java.awt.Container.processEvent(Container.java:2039)
at java.awt.Component.dispatchEventImpl(Component.java:4660)
at java.awt.Container.dispatchEventImpl(Container.java:2097)
at java.awt.Component.dispatchEvent(Component.java:4488)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4575)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4236)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4166)
at java.awt.Container.dispatchEventImpl(Container.java:2083)
at java.awt.Window.dispatchEventImpl(Window.java:2489)
at java.awt.Component.dispatchEvent(Component.java:4488)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:674)
at java.awt.EventQueue.access$400(EventQueue.java:81)
at java.awt.EventQueue$2.run(EventQueue.java:633)
at java.awt.EventQueue$2.run(EventQueue.java:631)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:647)
at java.awt.EventQueue$3.run(EventQueue.java:645)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:644)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
[catch] at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
SEVERE [global]
java.lang.AssertionError: Display name not defined: OptionsDialog/Java/fr-tikione-jacocoverage-plugin-config-JaCoCoverageOptionsPanelController
at org.netbeans.modules.options.TabbedController.readPanels(TabbedController.java:330)
at org.netbeans.modules.options.TabbedController.(TabbedController.java:116)
at org.netbeans.modules.options.OptionsCategoryImpl.create(OptionsCategoryImpl.java:120)
at org.netbeans.modules.options.CategoryModel$Category.create(CategoryModel.java:378)
at org.netbeans.modules.options.CategoryModel$Category.getComponent(CategoryModel.java:426)
at org.netbeans.modules.options.OptionsPanel.setCurrentCategory(OptionsPanel.java:252)
at org.netbeans.modules.options.OptionsPanel.clearAllinQS(OptionsPanel.java:756)
at org.netbeans.modules.options.OptionsPanel.clearSearchField(OptionsPanel.java:389)
at org.netbeans.modules.options.OptionsPanel.cancel(OptionsPanel.java:287)
at org.netbeans.modules.options.OptionsDisplayerImpl$MyWindowListener.windowClosing(OptionsDisplayerImpl.java:439)
at java.awt.AWTEventMulticaster.windowClosing(AWTEventMulticaster.java:333)
at java.awt.Window.processWindowEvent(Window.java:1871)
at javax.swing.JDialog.processWindowEvent(JDialog.java:627)
at java.awt.Window.processEvent(Window.java:1829)
at java.awt.Component.dispatchEventImpl(Component.java:4660)
at java.awt.Container.dispatchEventImpl(Container.java:2097)
at java.awt.Window.dispatchEventImpl(Window.java:2489)
at java.awt.Component.dispatchEvent(Component.java:4488)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:674)
at java.awt.EventQueue.access$400(EventQueue.java:81)
at java.awt.EventQueue$2.run(EventQueue.java:633)
at java.awt.EventQueue$2.run(EventQueue.java:631)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:647)
at java.awt.EventQueue$3.run(EventQueue.java:645)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:644)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
[catch] at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
SEVERE [global]
java.lang.AssertionError: Display name not defined: OptionsDialog/Java/fr-tikione-jacocoverage-plugin-config-JaCoCoverageOptionsPanelController
at org.netbeans.modules.options.TabbedController.readPanels(TabbedController.java:330)
at org.netbeans.modules.options.TabbedController.(TabbedController.java:116)
at org.netbeans.modules.options.OptionsCategoryImpl.create(OptionsCategoryImpl.java:120)
at org.netbeans.modules.options.CategoryModel$Category.create(CategoryModel.java:378)
at org.netbeans.modules.options.CategoryModel$Category.getComponent(CategoryModel.java:426)
at org.netbeans.modules.options.OptionsPanel.setCurrentCategory(OptionsPanel.java:252)
at org.netbeans.modules.options.OptionsPanel.clearAllinQS(OptionsPanel.java:756)
at org.netbeans.modules.options.OptionsPanel.clearSearchField(OptionsPanel.java:389)
at org.netbeans.modules.options.OptionsPanel.cancel(OptionsPanel.java:287)
at org.netbeans.modules.options.OptionsDisplayerImpl$OptionsPanelListener.actionPerformed(OptionsDisplayerImpl.java:417)
at org.netbeans.core.windows.services.NbPresenter$ButtonListener.actionPerformed(NbPresenter.java:1386)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6297)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3275)
at java.awt.Component.processEvent(Component.java:6062)
at java.awt.Container.processEvent(Container.java:2039)
at java.awt.Component.dispatchEventImpl(Component.java:4660)
at java.awt.Container.dispatchEventImpl(Container.java:2097)
at java.awt.Component.dispatchEvent(Component.java:4488)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4575)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4236)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4166)
at java.awt.Container.dispatchEventImpl(Container.java:2083)

Test Reports are not saved

I'm setting up a standard development process that includes the JaCoCo netbeans plugin. Once thing I need is to be able to check in records of the testing that was done. I notice that the plugin seems to clean up after itself and doesn't leave the completed report anywhere.

What I'd like is something similar to what JUnit does in netbeans, which is to produce a test record under build/test/results. It would be nice if I had something like that stored by JaCoCo that would tell me which lines of code were covered and which weren't at the time of a particular checkin.

Is there any possibility those records could be preserved under the build directory?

Can't change color theme

Hi,

if I wan't to change the color theme over options-> JaCoCoverage to "Norway Today", he still use the "Netbeans (default)" theme. I use netbeans version 8.1

Ant Task or JaCoCo Agent failed for project with non US-ASCII path

Windows 8.1, JDK 1.8.0_20, NetBeans 8.0.2, TikiOne JaCoCoverage plugin version 1.5.1.20150301.1800.
For ANT project with non US-ASCII characters in the path the "Run with JaCoCoverage" and "Test with JaCoCoveragge" commands results in an error:
"Ant Task or JaCoCo Agent failed, JaCoCoverage can't process data. (AntExitCode=0, JacocoBinReportFound=false)"

Remove line hightlighting after running TikiOne JaCoCoverage

Thanks for your work, it works great with Netbeans 7.3!
I have one question, when I ran the tests using your plugin it highlights the (un)covered lines as it should. I want the highlighting of the lines only temporary to see what was covered, is it possible to hide it afterwards? I was only able to do this by restarting Netbeans so far.
Thanks in advance!

Test With JaCoCo does not work on very large projects.

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?

Free-form project support?

Hi, I was wondering if the plugin will work for Web Free-Form Applications? I can't seem to find the right click menu options for the plugin on this type of project. Thanks!

Exclusive Package Filter

Would it be possible to add a per project filter that includes only the selected packages and exclude everything else?

I am running code coverage on a NetBeans platform module that depends on quite a number of other (large) modules. And the coverage report takes around 30 minutes to generate because it looks at the large number of packages in the other modules too. I suspect this might be the real cause of issue number #29 too - it will complete eventually.

Is there maybe a manual workaround in the meantime, such as editing the project.json file somehow?

Plugin doesn't work when jacoco plugin version is not specified in maven pom.xml

Hi,

This plugin doesn't work if jacoco plugin version is not specified and left to maven to resolve. Maven will work fine and produce jacoco report, but netbeans integration will fail.

It starts working if you specify version explicitly.

For example:

<build>
    <plugins>
        <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <!--
                        <version>0.7.4.201502262128</version>
            -->
            <executions>
                <execution>
                    <goals>
                        <goal>prepare-agent</goal>
                    </goals>
                </execution>
                <execution>
                    <id>report</id>
                    <phase>prepare-package</phase>
                    <goals>
                        <goal>report</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

Easily switch on/off highlighting of coverage information

Hi,

It would be nice to have a way to easily show or hide coverage information in source code. I am thinking about an additional item in NetBeans->View menu, like "Show Coverage Info.", however, don't know whether it is possible with NetBeans plugins system.

Source code should not be only located in NetBeans prj. directory

Hi,

I got the following exception once I moved sources out of the NetBeans prj. directory:

java.io.FileNotFoundException: File 'D:\dev\prj\tools\netbeans\project\com\test\examples\Example.java' does not exist
    at org.apache.commons.io.FileUtils.openInputStream(FileUtils.java:299)
    at org.apache.commons.io.FileUtils.readLines(FileUtils.java:1783)
    at org.apache.commons.io.FileUtils.readLines(FileUtils.java:1819)
[catch] at fr.tikione.jacocoverage.plugin.util.NBUtils.colorDoc(NBUtils.java:127)
    at fr.tikione.jacocoverage.plugin.action.JaCoCoActionOnAnt$2.run(JaCoCoActionOnAnt.java:219)
    at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1432)
    at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2042)

Actually, source code is stored in "D:\dev\prj\src\main" and tests are stored in "D:\dev\prj\src\test".
NetBeans prj. is located in "D:\dev\prj\tools\netbeans".

Looks like it always expects that source code is inside NetBeans prj. directory.

No context menu for "not supported project types"

After activating the plugin (1.1.0 from Plugin Portal) and restarting NetBeans (7.3) the context menu for unsupported project types (Maven, Gradle) won't open anymore - which is a bit annoying :-)

I have the following error several times in my messages.log:

SEVERE [global]
java.lang.NullPointerException
    at fr.tikione.jacocoverage.plugin.RunProjectWithJaCoCoAction$ContextAction.<init>(RunProjectWithJaCoCoAction.java:70)
    at fr.tikione.jacocoverage.plugin.RunProjectWithJaCoCoAction.createContextAwareInstance(RunProjectWithJaCoCoAction.java:48)
    at org.openide.util.Utilities.actionsToPopup(Utilities.java:2830)
    at org.openide.util.Utilities.actionsToPopup(Utilities.java:2926)
    at org.openide.explorer.view.TreeView.createPopup(TreeView.java:1058)
    at org.openide.explorer.view.TreeView$PopupAdapter.showPopup(TreeView.java:1555)
    at org.openide.awt.MouseUtils$PopupMouseAdapter.maybePopup(MouseUtils.java:189)
    at org.openide.awt.MouseUtils$PopupMouseAdapter.mouseReleased(MouseUtils.java:184)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:290)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
    at java.awt.Component.processMouseEvent(Component.java:6505)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
    at java.awt.Component.processEvent(Component.java:6270)
    at java.awt.Container.processEvent(Container.java:2229)
    at java.awt.Component.dispatchEventImpl(Component.java:4861)
    at java.awt.Container.dispatchEventImpl(Container.java:2287)
    at java.awt.Component.dispatchEvent(Component.java:4687)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
    at java.awt.Container.dispatchEventImpl(Container.java:2273)
    at java.awt.Window.dispatchEventImpl(Window.java:2719)
    at java.awt.Component.dispatchEvent(Component.java:4687)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:723)
    at java.awt.EventQueue.access$200(EventQueue.java:103)
    at java.awt.EventQueue$3.run(EventQueue.java:682)
    at java.awt.EventQueue$3.run(EventQueue.java:680)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
    at java.awt.EventQueue$4.run(EventQueue.java:696)
    at java.awt.EventQueue$4.run(EventQueue.java:694)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:693)
    at org.casaburo.utils.textPopupMenu.PopupMenuEventQueue.dispatchEvent(PopupMenuEventQueue.java:114)
[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

Besides this it seems to wor fine. I'd really like to use this plugin!

Incorrect coverage for synchronized blocks

Unless I'm doing something wrong, I think there might be an issue with the coverage of synchronized blocks. Below I have attached examples of a simple getter. In the first 2 cases the methods coverage is 67% instead of 100%. The last image as an example where the value is returned outside of the synchronized block, yet the coverage is 72% while I'd expect 100%.

Example 1:
jaco
Example 2:
jaco2
Example 3:
jaco3

Gradle Support?

Was just wondering if there is going to be gradle support anytime soon ?

Thank yo!

NetBeans 7.3.1 throwing java.lang.IllegalArgumentException: Called DataObject.find on null

Build: NetBeans IDE 7.3.1 (Build 201306052037)
VM: Java HotSpot(TM) Client VM, 23.25-b01, Java(TM) SE Runtime Environment, 1.7.0_25-b16
OS: Windows 7

User Comments:
joecsc: I downloaded and installed the JaCoCo code coverage plugin. When I right-click th eproject and chose "Run with JaCoCo Coverage", the IDE interface did not change (no noticeable output) and this excception was generated. If I use "Test with JaCoCo Coverage" an exception is also thrown.

Stacktrace:
java.lang.IllegalArgumentException: Called DataObject.find on null
at org.openide.loaders.DataObject.find(DataObject.java:545)
at fr.tikione.jacocoverage.plugin.action.JaCoCoActionOnAnt.runJacocoJavaagent(JaCoCoActionOnAnt.java:137)
at fr.tikione.jacocoverage.plugin.action.JaCoCoActionOnAnt.access$000(JaCoCoActionOnAnt.java:47)
at fr.tikione.jacocoverage.plugin.action.JaCoCoActionOnAnt$1.run(JaCoCoActionOnAnt.java:76)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1432)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2044)

Reported as NetBeans bug 235191 (https://netbeans.org/bugzilla/show_bug.cgi?id=235191) - told to report bug here.

Thanks!

Joe

Ability to select testsuites to test

Hi, I haven't been able to find a way to test testsuites, only tests. I have several suites with multiple tests, however in the suite there's code in the setUpClass() which isn't excecuted when only testing the tests themselves. It's just an idea :) Thanks in advance!

style and colour usage in editor pane

Excellent work. Just what we need in our education.
Works with java6 and java7.
Missing this functionality kept us from using java7 in our projects in education.

A few suggestions:

  • It would be nice if all the lines in a statement were coloured according to the coverage measurement. Now only the first line is. This requires some interpretation and slows you down when verifying the coverage with your eyes. All green is good.

snapshot1

  • Add 'rubies' to the lines that have branches or complex expressions, very much like the html coverage report created by the jacoco reporting tool. You could put them in the left hand 'gutter', like netbeans it selves and e.g. the checkstyle plugin do. You could then encode more of the coverage state in that 'ruby', e.g. colour red (real ruby ;)) is not covered, green (maybe a jade gem) for full coverage and other colours and maybe numbers for partial coverage.
  • The ruby would also allow you to generate a tool tip which could be used to reveal the conditions that have not been covered. It is acceptable of course, to use the conditions as found and compiled into the tested class file.
  • add a right click menu- test option for a single file too, either at the 'file under test' or the test class.
    When attempting to increase the coverage in an IDE you do not always want to start the whole test suite.

Does not work with NetBeans module development

1 Installed Java7u21, NetBeans 7.3.1
2 Created a simple NetBeans Platform Module, with simply one class, and one simple test with Junit4
3 Launched the action Test with JaCoCoverage gives this result:

Ant Test or JaCoCo Agent failed, JaCoCoverage can't process data.
(AntExitCode=0, JaCoCoBinReportFound=false)

Otherwise with a java project it works correctly

jacocoverage issue

Where is total Code Coverage ?

I am using this plugins on my Netbeans and run the test. But there is only code coverage for separate classes. Where can i find the total code coverage of a Java project ? Please suggest.

screenshot_19

Non termination with RCP modules

I have tried this plugin on a module that is part of our NetBeans Based application. It launches the tests but after that it does not seem to stop and starts generating huge (> Gb) files on my disk without stopping. I had to closet NetBeans to manually to stop it

code highlighting not working with 8.0.2

I am able to run Test with Jacococoverage, I can see the report in the NetBeans output window and also in the browser window, however there is no code highlighting after the run. The project settings show that code highlighting is enabled, and I've checked the messages.log and see no errors and this is what is in the plugin.properties file:

JaCoCoverage.Editor.EnableCodeHighlighting=true
JaCoCoverage.Editor.EnableCodeHighlightingExtended=true
JaCoCoverage.Editor.Theme=0
JaCoCoverage.Html.AutoOpenReport=true
JaCoCoverage.Html.EnableReport=true
JaCoCoverage.JaCoCoWorkfiles.Rule=0
JaCoCoverage.JavaAgent.customJacocoJarPath=/foo/bar/jacocoagent.jar
JaCoCoverage.JavaAgent.useCustomJacocoJar=false
JaCoCoverage.NbConsole.EnableReport=true

Is there something else I have to do to enable code highlighting?

Multimodule testing

Two (or more) opened projects: ProjectA as main project, and ProjectB as a ProjectA's library.
Add an option to display coverage data of both projects.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.