This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 166144 - JUnit's diff menu item doesn't work for Maven projects
Summary: JUnit's diff menu item doesn't work for Maven projects
Status: RESOLVED INCOMPLETE
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 6.x
Hardware: Sun All
: P3 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords: RANDOM
Depends on:
Blocks:
 
Reported: 2009-05-28 01:00 UTC by rdelaplante
Modified: 2011-03-16 23:30 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
sample project that works for me (9.33 KB, text/plain)
2009-07-24 14:45 UTC, David Simonek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rdelaplante 2009-05-28 01:00:04 UTC
In NetBeans 6.7 the Maven support switched to the common test runner, but the diff menu item is missing.  This would be
very useful, so please fix this bug before the 6.7 release. Maven is supposed to be a first class citizen in NetBeans 6.7
Comment 1 Andrey Yamkovoy 2009-05-28 07:22:19 UTC
Diff action is created on the Common Test Runner Side for the TestMethod node by default. If you are not see this action
in the context menu if the test method node it means the method getActions of the TestMethod node was ovverided in the
maven. So, not a JUnit nor Common Test Runner issue.
Reassign to maven for evaluation.
Comment 2 Milos Kleint 2009-05-28 12:23:16 UTC
with a sample maven project, I'm able to see the "View difference" menu item on failed tests and I can invoke it and see
the diff.
It seems to work both for "Test" project popup menu (invoked by maven) and with "Test file" action invoked on the test
file (invoked by ant via Compile on Save)

reassigning to dsimonek for deeper evaluation, could be platform dependent, in any case we would need some sample
project and detailed steps to reproduce.
Comment 3 rdelaplante 2009-06-11 14:54:26 UTC
This doesn't show for me in any maven project, big or small using NB 6.7 RC2. 
Comment 4 David Simonek 2009-07-24 14:45:25 UTC
Created attachment 85187 [details]
sample project that works for me
Comment 5 David Simonek 2009-07-24 14:50:19 UTC
rdelaplante, please provide more details and exact reproduction steps, I can't reproduce and it seems everything works
OK for me, but I'm not sure if I understand your bug description, please provide more details. I attached small project
with failing test that works OK for me, and the same applies to issue 166142. Thank you.
Comment 6 rdelaplante 2009-07-24 14:54:45 UTC
I verified that it works fine on this tiny project, but it still does not work on larger maven projects.  I just hear my
computer beep when i click the "Go To Source" menu item, and nothing happens.   How do I test?  I change a passing test
to make it fail, save, press CTRL-F6 to run the tests.  I expand the JUnit tree nodes to expose the failing test, right
click on the failing test and click "Go To Source".  I hear my computer beep, and nothing happens.   Maybe try checking
out an open source Maven2 project of a good size and try it.  
Comment 7 rdelaplante 2009-07-24 15:12:02 UTC
Hopefully tonight or this weekend I can create a new Maven2 web project with the same dependencies my current project
has, and reproduce the problem without having to put my closed source code in there.  Maybe the issue is related to my
pom.  For example, I have this in there:

<plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.4.3</version>
                <configuration>
                    <!-- Only execute test cases -->
                    <includes>
                        <include>**/*Test.java</include>
                    </includes>
                    <!-- Exclude individual integration tests since they are
                         executed using a suite. Also exclude the test suite
                         until we can figure out how to get Spring working with
                         multiple data sources in the unit test environment -->
                    <excludes>
                        <exclude>**/*IntegrationTest.java, **/*IntegrationTestSuite.java</exclude>
                    </excludes>
                </configuration>
            </plugin>
Comment 8 David Simonek 2009-09-25 13:06:46 UTC
rdelaplante, any news on this? I still have no success with reproducing this issue...
Comment 9 rdelaplante 2009-09-25 19:43:17 UTC
Well, I'm now using NB 6.7.1 on OpenSolaris and I still odn't get a diff menu item.  I can see the text pane on the
right says :

Unexpected method call findInstanceByPK("testa"):
    findInstanceByPK("abcd"): expected: at least 1, actual: 0)

But there is no diff context menu on that failed test.  All of the issues I reported with the junit window are still
happening.  I often can't double click a failed test to go to the source, or use the Go To Source cntext menu either
because it does nothing.  Sometimes it works though, so I have no idea what the problem is. 
Comment 10 Jesse Glick 2011-03-16 23:30:07 UTC
Still missing enough details to reproduce and evaluate.