apache / netbeans

Apache NetBeans
https://netbeans.apache.org/
Apache License 2.0
2.55k stars 813 forks source link

Run Focused Test Method and Debug Focused Test Method don't work #7099

Closed PavelTurk closed 1 month ago

PavelTurk commented 1 month ago

Apache NetBeans version

Apache NetBeans 21 release candidate

What happened

When I do right click on test method and select Run Focused Test Method or Debug Focused Test Method I got message No provide can handle this test method. At the same time Test File and Debug Test File work without any problems. This is a java maven project, test framework is junit 5.10.1.

Language / Project Type / NetBeans Component

Java Maven Project with JPMS

How to reproduce

1) Test must also contain module-info with the following content:

open module HERE_MAIN_MODULE_NAME {

    requires org.junit.jupiter.api;
    ....
}

2) Create class FooTest

public class FooTest {

    @Test
    public void test() {
        var text = "text";
   }
}

3) Right click inside test() method, Run Focused Test Method or Debug Focused Test Method.

Did this work correctly in an earlier version?

No / Don't know

Operating System

Ubuntu 20.04.3 LTS

JDK

21.0.1; OpenJDK 64-Bit Server VM 21.0.1+12-29

Apache NetBeans packaging

Apache NetBeans binary zip

Anything else

Please fix it, because it is very annoying to comment other tests if only one is required.

Are you willing to submit a pull request?

No

neilcsmith-net commented 1 month ago

Please attach a minimal zipped up project that demonstrates the issue. Thanks!

PavelTurk commented 1 month ago

@neilcsmith-net

  1. git clone https://github.com/PavelTurk/nb-3725.git
  2. open Impl1 maven module
  3. There is a ClassB1Test in com.foo.impl1.package1. Test File works. Run Focused Test Method doesn't work.
neilcsmith-net commented 1 month ago

I've had a quick look at the link, which seems to be a repo of 1400+ files?! I'm leaving the pending-response label on this. Please follow up with the request - a minimal (ideally < 10 files) project that illustrates the issue, zipped and attached to this issue report.

Incidentally, there's no need to ping me - I assume the extra comment was deleted? - I have limited time to look at NetBeans stuff right now, and any other committer might pick this up once the requested info has been provided.

PavelTurk commented 1 month ago

@neilcsmith-net Please, if you decide to take a part in issue discussing and ask for something, then please, be so polite and answer when you are asked.

Because I am not sure any more - if I should ignore your messages or not.

neilcsmith-net commented 1 month ago

@PavelTurk I literally just replied! No-one is being paid to answer your questions. We'll pick things up as and when we can.

My request was not so that I specifically can pick up your issue, either, but so that someone can. You don't need me to answer!

PavelTurk commented 1 month ago

@neilcsmith-net I can't provide another code to reproduce the bug - I have limited time to look at NetBeans stuff. If you find it too large - you can delete the unnecessary files (right click, delete).