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.
Open openide.filesystems project. Change one test in XMLFileSystemTestHid.java to fail. Run XMLFileSystemTest.java. When the test fails, try "Run Again" from its node popup menu. The execution fails. The system thinks that XMLFileSystemTestHid is the test class, not XMLFileSystemTest.
Seems we lost desired behavior of the action "Run Again" for a test method node when implementation has been switched to use Common Runner API for displaying test results. Probably, the problem is here: http://hg.netbeans.org/main/file/7452a33b0ea0/junit/src/org/netbeans/modules/junit/output/JUnitTestMethodNode.java#l80 where testFO is used instead of commented out suiteFile. Unfortunately, methods required to get suiteFile are not supported by the implementation gsf.testrunner. The class org.netbeans.modules.gsf.testrunner.api.Testcase support concept "class" only, but it does not support concept "test suite". Note, this bug describes a case when "class" is not the same as the "test suite", i.e: * class XMLFileSystemTest extends FileSystemFactoryHid * just executed class XMLFileSystemTest is "test suite". * FileSystemFactoryHid is the "class" containing a test method intended to be run again. BTW in the described case, if the action "Run Again" will be called from the pop-up menu of the suite node, i.e. org.openide.filesystems.XMLFileSystemTest FAILED then the correct suite (i.e. XMLFileSystemTest) will be run, not XMLFileSystemTestHid that the method belong to.
(In reply to comment #1) > Seems we lost desired behavior of the action "Run Again" for a test method node > when implementation has been switched to use Common Runner API for displaying > test results. AFAICT this behavior was never present. I checked with earlier version 6.7,6.8 and the run Again action was not even there. > Note, this bug describes a case when "class" is not the same as the "test > suite", i.e: > * class XMLFileSystemTest extends FileSystemFactoryHid > * just executed class XMLFileSystemTest is "test suite". > * FileSystemFactoryHid is the "class" containing a test method intended to be > run again. AFAICT this is only problematic in the case where some initialization is happening in the suite file. If not then the correct class is run