[ 
https://issues.apache.org/jira/browse/SUREFIRE-1633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17130949#comment-17130949
 ] 

Vincent Massol edited comment on SUREFIRE-1633 at 6/10/20, 5:08 PM:
--------------------------------------------------------------------

FWIW I've tried:

{code}
public class AllIT
{
    @Nested
    @DisplayName("Wiki Manager REST Panels Tests")
    class NestedWikiManagerRestIT extends WikiManagerRestIT
    {
    }

    @Nested
    @DisplayName("Wiki Template Tests")
    class NestedWikiTemplateIT
    {
        @Test
        void xxx()
        {
            assertTrue(true);
        }
    }

    @Nested
    @DisplayName("Tests using a subwiki")
    class NestedSubWikiIT extends SubWikiIT
    {
    }
}
{code}

And then {{mvn clean install 
-Dit.test=org.xwiki.wiki.test.ui.AllIT.NestedWikiTemplateIT*}} and same result 
(test is not found).

{noformat}
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on 
project xwiki-platform-wiki-test-docker: No tests were executed!  (Set 
-DfailIfNoTests=false to ignore this error.) -> [Help 1]
[
{noformat}

 But that's potentially normal if the surefire plugin obeys the includes 
defined in its config. The issue being that we need the failsafe one to use the 
{{-Dit.test}}, not the surefire one ;) 


was (Author: vmassol):
FWIW I've tried:

{code}
public class AllIT
{
    @Nested
    @DisplayName("Wiki Manager REST Panels Tests")
    class NestedWikiManagerRestIT extends WikiManagerRestIT
    {
    }

    @Nested
    @DisplayName("Wiki Template Tests")
    class NestedWikiTemplateIT
    {
        @Test
        void xxx()
        {
            assertTrue(true);
        }
    }

    @Nested
    @DisplayName("Tests using a subwiki")
    class NestedSubWikiIT extends SubWikiIT
    {
    }
}
{code}

And then {{mvn clean install 
-Dit.test=org.xwiki.wiki.test.ui.AllIT.NestedWikiTemplateIT*}} and same result 
(test is not found). But that's potentially normal if the surefire plugin obeys 
the includes defined in its config. The issue being that we need the failsafe 
one to use the {{-Dit.test}}, not the surefire one ;) 

> [JUnit5 follow-up #1343] JUnit Jupiter @Nested tests do not run when 
> selecting enclosing class with Surefire
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-1633
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1633
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: JUnit 5.x support
>            Reporter: Christian Stein
>            Priority: Major
>             Fix For: Backlog
>
>
> https://github.com/junit-team/junit5/issues/1343



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to