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.
Summary: | Inactive "Debug/Run Focused Test Method" in *TestCase named test classes included in *Test named suites | ||
---|---|---|---|
Product: | java | Reporter: | petrk |
Component: | JUnit | Assignee: | Theofanis Oikonomou <theofanis> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | aquaglia, markiewb, vv159170 |
Priority: | P3 | ||
Version: | 7.4 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
petrk
2013-07-15 12:28:00 UTC
Hi Petr, isn't this a Maven based CND project? If so, this might be a duplicate of issue #232519. Hi Jiri, no, this is Ant based project. Maybe a CND project issue? I don't know, but really doubt that this is our issue. Even could not imagine how it might be related to us, because it is a bug in Java project ;) By the way, in other modules (org.netbeans.modules.utilities for example) both items are active in all test classes, but if I create new one, they are still inactive in it. Test class, which I use for tests: public class NewClass extends NbTestCase { public NewClass(String name) { super(name); } // Debug focused should be active public void testABC() throws Exception { } } Later I'll try to create new module and check if the bug could be reproduced in it. Then it must be a problem of JUnit integration. The fact that it concerns Run as well, proves that it's not a bug of debugger. I experience the same issue in Linux. Run/Debug focused test method doesn't work i.e. if I open org.netbeans.modules.cnd.completion.NamespacesTestCase (In reply to petrk from comment #4) > I don't know, but really doubt that this is our issue. The problem lies with the naming of your test casses. The menu items are disabled in all the classes that end with TestCase.java and are enabled in all classes that end with Test.java right? If this is the case then this is as designed. please see bug 227358 for discussion about the way the "Run/Debug focused test method" menu items get enabled. When you try to create a new test case for an existing class then the wizard informs you that you need to have a test class ending with Test.java in order for the infrastructure to be able to run the file and navigate between test and tested classes. Honestly I've never used wizard to create tests :-) Our tests named *TestCase to be not runnable twice, but in context of named suites (which named as *Test and extends NbTestSuite). It worked "by previous design" which was very convenient. It is possible to not have navigate between class/test class, but have enabled Run/Debug back? *** Bug 234620 has been marked as a duplicate of this bug. *** Can we restore "Run/Debug focused test method" inside *TestCase classes back? While it's ok to have disabled navigate between test and tested classes if this is a problem. (In reply to Vladimir Voskresensky from comment #8) > Honestly I've never used wizard to create tests :-) on the other hand I almost always use the wizard :) > Our tests named *TestCase to be not runnable twice, but in context of named > suites (which named as *Test and extends NbTestSuite). > It worked "by previous design" which was very convenient. > It is possible to not have navigate between class/test class, but have > enabled Run/Debug back? Fair enough. Fixed: http://hg.netbeans.org/core-main/rev/3a4b61b7a20a. Now the actions are enabled if the activated file is a java file and is contained in a test folder. Great! Thank you so much! *** Bug 232519 has been marked as a duplicate of this bug. *** *** This bug has been marked as a duplicate of bug 232519 *** |