Bug 190761 - Cannot run single failed test when in different classfile
Cannot run single failed test when in different classfile
Status: NEW
Product: utilities
Classification: Unclassified
Component: Test Runner
-S1S-
Other Linux
: P3 with 1 vote (vote)
: 7.0
Assigned To: Theofanis Oikonomou
issues@utilities
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-10-05 08:32 UTC by Jaroslav Tulach
Modified: 2012-11-20 12:27 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2010-10-05 08:32:28 UTC
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.
Comment 1 Victor Vasilyev 2010-10-08 05:06:22 UTC
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.
Comment 2 Theofanis Oikonomou 2012-11-20 12:27:04 UTC
(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


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo