You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "matthiasblaesing (via GitHub)" <gi...@apache.org> on 2025/07/21 19:07:49 UTC
[PR] Maven-JUnit Integration: Support nested and toplevel non-public tests and stabiize result extraction [netbeans]
matthiasblaesing opened a new pull request, #8664:
URL: https://github.com/apache/netbeans/pull/8664
JUnit allows to declare tests on nested (`NestedClass2` and `DoubleNestedClass3` below) and also non public top level classes (`PackagedTopLevelNonPublicTest`) in addition to the traditional toplevel class tests (`test4`):
```java
public class PackagedTopLevelTest {
@Test
public void test4() {
System.out.println("Executed test.PackagedTopLevel#test4");
}
@Nested
class NestedClass2 {
@Test
public void test6() {
System.out.println("Executed test.PackagedTopLevelTest$NestedClass2#test6");
}
@Nested
class DoubleNestedClass3 {
@Test
public void test8() {
System.out.println("Executed test.PackagedTopLevelTest$NestedClass2$DoubleNestedClass3#test8");
}
}
}
}
class PackagedTopLevelNonPublicTest {
@Test
public void test10() {
System.out.println("Executed test.PackagedTopLevelNonPublic#test10");
}
}
```
In addition to that Unittests can be placed in the default package and support the same set of special cases.
This PR adds support for these cases:
- running of single test from nested/top level non-public classes
- rerunning/debugging test from nested/top level non-public classes
In addition while investigating the fix, it was observed, that the unittest result extraction sometimes yielded an incomplete set. I.e. some of the test data was missing. Analysis showed, that he XML reports from maven surefire were not yet written/updated while the console output was already done.
Another identified problem fixed here was incomplete detection of Jupiter (JUnit5) usage in the unittest run.
It is inspired by the work from @ratcashdev.
Closes: #3975
Closes. #3995
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [PR] Maven/Gradle-JUnit Integration: Support nested and toplevel non-public tests and stabiize result extraction [netbeans]
Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on code in PR #8664:
URL: https://github.com/apache/netbeans/pull/8664#discussion_r2296877998
##########
ide/projectapi/nbproject/project.properties:
##########
@@ -18,7 +18,7 @@
is.autoload=true
javac.compilerargs=-Xlint -Xlint:-serial
-javac.source=1.8
+javac.target=17
Review Comment:
`javac.release=17`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [PR] Maven/Gradle-JUnit Integration: Support nested and toplevel non-public tests and stabiize result extraction [netbeans]
Posted by "matthiasblaesing (via GitHub)" <gi...@apache.org>.
matthiasblaesing commented on code in PR #8664:
URL: https://github.com/apache/netbeans/pull/8664#discussion_r2301411730
##########
ide/projectapi/nbproject/project.properties:
##########
@@ -18,7 +18,7 @@
is.autoload=true
javac.compilerargs=-Xlint -Xlint:-serial
-javac.source=1.8
+javac.target=17
Review Comment:
Thanks - overlooked that. I would have sworn I had that corrected before, oh well :smile:
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [PR] Maven/Gradle-JUnit Integration: Support nested and toplevel non-public tests and stabiize result extraction [netbeans]
Posted by "matthiasblaesing (via GitHub)" <gi...@apache.org>.
matthiasblaesing merged PR #8664:
URL: https://github.com/apache/netbeans/pull/8664
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists