You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Vincent Massol (Jira)" <ji...@apache.org> on 2020/06/10 16:22:00 UTC

[jira] [Commented] (SUREFIRE-1633) [JUnit5 follow-up #1343] JUnit Jupiter @Nested tests do not run when selecting enclosing class with Surefire

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

Vincent Massol commented on SUREFIRE-1633:
------------------------------------------

[~silramos] Hi, thanks for the workaround. However it doesn't work for us when we want to run only one of the nested test classes.

We have:

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

    @Nested
    @DisplayName("Wiki Template Tests")
    class NestedWikiTemplateIT extends WikiTemplateIT
    {
    }

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

I tried: {{mvn clean install -Dit.test=org.xwiki.wiki.test.ui.AllIT.NestedWikiTemplateIT*}} (I've also tried with the star) but it fails with:

{noformat}
Caused by: org.apache.maven.plugin.MojoFailureException: No tests were executed!  (Set -DfailIfNoTests=false to ignore this error.)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute (AbstractSurefireMojo.java:850)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
{noformat}

Any idea?

Thanks a lot

> [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)