-
Notifications
You must be signed in to change notification settings - Fork 852
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No test are shown when all tests passed with forked unit tests #7710
Comments
you are saying if you run this, the window will say no tests executed? Can you try to reproduce this in a new project? import org.junit.jupiter.api.Test;
public class Mavenproject1Test {
@Test
public void test1() {
}
@Test
public void test2() {
}
} its working for me. Tested with junit.jupiter 5.11.0. |
Interesting... I cannot reproduce it in a small, new project either... But I also have no idea where I should look for problems in the bigger project? I know the big project works fine in IntelliJ. The test section of the output looks pretty much the same:
The big project:
Does NetBeans check the output to determine which tests passed, or does it use something else? |
@Eccenux if I remember correctly the code you are looking for is here: The code uses a combination of "listening" to the output and reading the surefire/failsafe XML outputs. If the stdout output looks identical, the assumption would be, that the XML outputs are not at the expected location or maybe surpressed? |
@Eccenux would you like to give this dev-build a try https://github.com/apache/netbeans/actions/runs/10692992128/artifacts/1888805200? this is addressing an issue with multi-module builds and the test window - maybe we are lucky and it fixes your problem too. |
Dev build didn't help. But I was able to reproduce. Here is my small test project with which you should be able to reproduce the problem (also in the dev build): It's a problem with |
@Eccenux thanks for testing and the info! I suspected that it might be due to fork or other concurrency related problems (parallel build or mvnd). The detection for this situation is not very good right now, it will also fail if the config for this is in the parent pom. I am wondering if we should try a different approach there, e.g adding a file watch to the folder instead of delaying the check for the xml files. |
Apache NetBeans version
Apache NetBeans 22
What happened
I have some unit tests (
org.junit.jupiter.api.Test
). I execute tests, but when they are all OK (all passed) the I see status which indicates no testes where execute at all:Only when I go to Output tab I can see:
Language / Project Type / NetBeans Component
Java Maven Spring application
How to reproduce
Example test failing.
Did this work correctly in an earlier version?
No / Don't know
Operating System
Windows 11
JDK
17
Apache NetBeans packaging
Apache NetBeans provided installer
Anything else
No response
Are you willing to submit a pull request?
No
The text was updated successfully, but these errors were encountered: