Create new maven project
use project properties to switch source level to 1.5
in pom.xml switch junit version to 4.4
create new junit test -> created with junit 4 -> OK
invoke uncomment generated test , invoke Test action on project -> test is running -> OK
invoke Test File action on the junit 4 file -> test is not started (the same for BeforeClass, Before etc. annotated
methods) it seems that junit3 is used to run simple file
Sorry, I cannot reproduce. I was able to run the junit 4 test with or without compile on save on. Also I tried renaming
the test method to mainone() instead of the testMain() junit3 convention but it still got executed.
closing as worksforme, please state more details about your setup and how to reproduce. I'm using 20090326 (built from
I'm trying to reproduce using steps I've described yesterday, but it works for me as well :-( I'm not sure what was (is)
I'm now playing with it and I'm facing the same problem with bit more complicated project with junit4 - "Test" action
works well, but "Test File" does not.
My test file extends org.junit.TestCase, but it's annotated with @RunWith(JUnit4ClassRunner.class) so it should be run
with junit 4 runner. I'll attach my project.
Created attachment 79047 [details]
with you test project it seems to affect CoS driven Test File action only. If you disable CoS, the test runs correctly
Reassigning to java for evaluation. That's where the JavaRunner is implemented AFAIK.
This issue has nothing to do with JavaRunner, in fact, it is an issue of JUnit support, since it uses JUnit 3.x for all classes extending junit.framework.TestCase. Reproducible also with j2seproject.
- disable COS for maven -- fallback to maven works OK, since it does not use patched Ant.
- rename your methods to test* ;)
- do not extend TestCase
I think this can qualify as a P3.
netbeans_home/java2/ant/patches/72080.jar#Ant-1.7.1-source-code-patch-72080.diff, -357,43 +397,98 hunk.
Sorry Marian :(
Any progress on this issue? Thank you.
av: setting the target milestone shall be done by developers and means that it's not planned for 6.8, not sure if that's
what you wanted.
Yes, that's exactly what I planned to say :) This bug is valid and serious, but so far we don't plan to fix this for 6.8
unless time/bug situation permits.
Created attachment 121239 [details]
sorry, please disregard the attachment i have just uploaded: i meant to upload it into a different bug.
I am sorry but I cannot reproduce in NetBeans IDE 7.2 (Build 201207171143). I opened your project and invoked test and Test File actions. Both run as expected. Please reopen if it still happens for you. Thank you