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.
[ JDK VERSION : 1.6.0_07 ] see screenshot
Created attachment 65239 [details] screen shot
In short: - the projects infrastructure still uses a pattern "*Test.java" for finding JUnit test classes, no matter whether it is JUnit 3.x or JUnit 4.x - there is a bug that the dialogue warns about non-default name of a test class, while it it should only warn if the test class does not end with "Test"
I will fix this one together with bug #141166 ("wrong error Test class name contain space in the end").
Yes, jUnit4.x test classes can have name without "Test" name suffix, but you can also create and execute inside ide jUnit 3.x test class without "Test" name suffix. This is not a problem. Problem is that ide offers you a handy navigation between code class and corresponding test class. (Navigate > Go to Test/Tested Class). And this feature works only while user follows naming convetion - ...Test.java. Maybe mpetras will create some smart technique for navigation between classes and tests without using name convention, but I'm sure, that it will be not fixed in 6.5 release. >> I changed target milestone to "future".
I discussed this issue with ppis and tpavek. I will remove red color. This warning msg is not so important, because ide is able to create test class with any suitable name and is be able to execute that class. Only when a new class name does not follow pattern "TestedClassName" + "Test.java", navigation between tested class file and test class file will not work. So we need only better warning msg about this navigation issue. Kenneth, please, can you help me with a new warning msg about this issue?
My suggestion for a new message: You will not be able to navigate between the test class and the tested class if a non-default name is used.
Assigning issues from Michael to Andrey.
Fixed. For non-default name and name without "Test" at the end the different messages are displayed.
Integrated into 'main-golden', will be available in build *200903260733* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/517842c002d8 User: Andrey Yamkovoy <kaktus@netbeans.org> Log: Fix for #141165 - [65cat] The Create Tests dialogue should not give warning about non-default class names
Integrated into 'main-golden', will be available in build *201002180200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/5fc40bb20dcb User: Alexei Mokeev <av-nb@netbeans.org> Log: Fixed test (changes from #141165 fix were not reflected in test)