It’s not very easy to implement since it would need to support Nested tests in JUnit5.
For ex, failsafe generates:
TEST-org.xwiki.whatsnew.test.ui.AllITs.xml
:
<?xml version="1.0" encoding="UTF-8"?>
<testsuite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://maven.apache.org/surefire/maven-failsafe-plugin/xsd/failsafe-test-report-3.0.xsd" version="3.0" name="org.xwiki.whatsnew.test.ui.AllITs" time="61.602" tests="0" errors="0" skipped="0" failures="0">
<properties>... </properties>
</testsuite>
And TEST-org.xwiki.whatsnew.test.ui.AllITs$NestedWhatsNewIT.xml
:
<?xml version="1.0" encoding="UTF-8"?>
<testsuite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://maven.apache.org/surefire/maven-failsafe-plugin/xsd/failsafe-test-report-3.0.xsd" version="3.0" name="org.xwiki.whatsnew.test.ui.AllITs$NestedWhatsNewIT" time="5.304" tests="1" errors="0" skipped="0" failures="0">
<properties>... </properties>
<testcase name="verify(TestUtils)" classname="org.xwiki.whatsnew.test.ui.AllITs$NestedWhatsNewIT" time="5.298">
<system-out>...</system-out>
<system-err>...</system-err>
</testcase>
</testsuite>
And it’s not that easy to reconcile org.xwiki.whatsnew.test.ui.WhatsNewIT
with org.xwiki.whatsnew.test.ui.AllITs$NestedWhatsNewIT
. For that the check will need to parse AllIT
and know the concept of nested tests (i.e parse @Nested
) to extract out NestedWhatsNewIT
from:
@Nested
@DisplayName("What's New UI")
class NestedWhatsNewIT extends WhatsNewIT
{
}