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.
I tried running the CreateTestAction on a module that didn't have a test directory (classfile). The following exception was thrown: java.lang.IllegalArgumentException: URL must be a folder URL (append '/' if necessary): file:/work/src/netbeans/nb_all/classfile/test/unit/src at org.netbeans.spi.java.classpath.support.ClassPathSupport.createResource(ClassPathSupport.java:56) at org.netbeans.modules.junit.CreateTestAction.performAction(CreateTestAction.java:186) After creating the test/unit/src directory outside of the IDE, the action worked correctly.
confirmed
This is for projects. The code in JUnit does (essentially) just: ... URL testRoot = UnitTestForSourceQuery.findUnitTest(packageRoot); ClassPathSupport.createResource(testRoot) <-- throws the exception ... testRoot is something like "/home/or141057/tmp/App1/test", which directory doesn't exist.
Tomas, you were fixing this recently in some other place. Could you fix this too? Or assign to me if you do not have a time.
OK.
This is an NBM project, not a j2seproject. If there is no test dir, the test query should return null.
Checking in project/src/org/netbeans/modules/apisupport/project/UnitTestForSourceQueryImpl.java; /cvs/apisupport/project/src/org/netbeans/modules/apisupport/project/UnitTestForSourceQueryImpl.java,v <-- UnitTestForSourceQueryImpl.java new revision: 1.6; previous revision: 1.5 done Processing log script arguments... More commits to come... RCS file: /cvs/apisupport/project/test/unit/src/org/netbeans/modules/apisupport/project/UnitTestForSourceQueryImplTest.java,v done Checking in project/test/unit/src/org/netbeans/modules/apisupport/project/UnitTestForSourceQueryImplTest.java; /cvs/apisupport/project/test/unit/src/org/netbeans/modules/apisupport/project/UnitTestForSourceQueryImplTest.java,v <-- UnitTestForSourceQueryImplTest.java initial revision: 1.1
This issue was solved long time ago. Because nobody has reopened it neither added comments, we are verifying/closing it now. If you are still able to reproduce the problem, please reopen. Thanks in advance.