Bug 232709 - Inactive "Debug/Run Focused Test Method" in *TestCase named test classes included in *Test named suites
Inactive "Debug/Run Focused Test Method" in *TestCase named test classes incl...
Status: RESOLVED DUPLICATE of bug 232519
Product: java
Classification: Unclassified
Component: JUnit
7.4
All All
: P3 (vote)
: 7.4
Assigned To: Theofanis Oikonomou
junit-issues@java
:
: 234620 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-15 12:28 UTC by petrk
Modified: 2013-09-02 14:20 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description petrk 2013-07-15 12:28:00 UTC
Please see org.netbeans.modules.cnd.completion.CCBasicCompletionTestCase for example.

Product Version: NetBeans IDE Dev (Build 201307122300)
Comment 1 Jiri Kovalsky 2013-07-15 14:06:49 UTC
Hi Petr, isn't this a Maven based CND project? If so, this might be a duplicate of issue #232519.
Comment 2 petrk 2013-07-15 15:05:14 UTC
Hi Jiri, no, this is Ant based project.
Comment 3 Martin Entlicher 2013-07-15 15:17:45 UTC
Maybe a CND project issue?
Comment 4 petrk 2013-07-16 07:49:48 UTC
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.
Comment 5 Martin Entlicher 2013-07-16 08:12:38 UTC
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.
Comment 6 Vladimir Voskresensky 2013-08-12 09:40:42 UTC
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
Comment 7 Theofanis Oikonomou 2013-08-14 14:16:15 UTC
(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.
Comment 8 Vladimir Voskresensky 2013-08-20 09:07:31 UTC
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?
Comment 9 Vladimir Voskresensky 2013-08-20 09:12:04 UTC
*** Bug 234620 has been marked as a duplicate of this bug. ***
Comment 10 Vladimir Voskresensky 2013-08-20 12:57:33 UTC
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.
Comment 11 Theofanis Oikonomou 2013-08-21 10:21:24 UTC
(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.
Comment 12 Vladimir Voskresensky 2013-08-21 11:33:59 UTC
Great! Thank you so much!
Comment 13 almson 2013-09-02 12:11:05 UTC
*** Bug 232519 has been marked as a duplicate of this bug. ***
Comment 14 Theofanis Oikonomou 2013-09-02 14:20:10 UTC

*** This bug has been marked as a duplicate of bug 232519 ***


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