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

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

bq. Vincent Massol, already tried to change IT to "Test"? counting on you are 
using surefire instead of failsafe

[~silramos] Ah that's interesting! We are using both surefire and failsafe at 
the same time. In this case, the surefire plugin is not supposed to match any 
test class (only the failsafe one is) since we have:

{code}
  <build>
    <testSourceDirectory>src/test/it</testSourceDirectory>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <configuration>
          <includes>
            <include>**/AllIT.java</include>
          </includes>
        </configuration>
      </plugin>
    </plugins>
  </build>
{code}

And for surefire we have:

{code}
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.22.2</version>
...
            <includes>
              <include>**/*Test.java</include>
              <include>**/*IntegrationTests.java</include>
            </includes>
{code}

When I execute without {{-Dtest=}}  or {{-Dit.test}}, we get:

{noformat}
...
[INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ 
xwiki-platform-wiki-test-docker ---
[INFO] 
[INFO] --- maven-jar-plugin:3.2.0:jar (default-jar) @ 
xwiki-platform-wiki-test-docker ---
[INFO] Building jar: 
/Users/vmassol/dev/xwiki/xwiki-platform/xwiki-platform-core/xwiki-platform-wiki/xwiki-platform-wiki-test/xwiki-platform-wiki-test-docker/target/xwiki-platform-wiki-test-docker-12.5-SNAPSHOT.jar
[INFO] 
[INFO] --- maven-failsafe-plugin:2.22.2:integration-test (functional-tests) @ 
xwiki-platform-wiki-test-docker ---
[INFO] 
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.xwiki.wiki.test.ui.AllIT
...
{noformat}

So what I don't get is why the surefire plugin is interpreting {{-Dit.test}} 
when I pass it. It shouldn't! :)




was (Author: vmassol):
bq. Vincent Massol, already tried to change IT to "Test"? counting on you are 
using surefire instead of failsafe

[~silramos] Ah that's interesting! We are using both surefire and failsafe at 
the same time. In this case, the surefire plugin is not supposed to match any 
test class (only the failsafe one is) since we have:

{code}
  <build>
    <testSourceDirectory>src/test/it</testSourceDirectory>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <configuration>
          <includes>
            <include>**/AllIT.java</include>
          </includes>
        </configuration>
      </plugin>
    </plugins>
  </build>
{code}

And for surefire we have:

{code}
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.22.2</version>
...
            <includes>
              <include>**/*Test.java</include>
              <include>**/*IntegrationTests.java</include>
            </includes>
{code}

When I execute without {{-Dtest=}}  or {{-Dit.test}}, we get:

{noformat}
...
[INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ 
xwiki-platform-wiki-test-docker ---
[INFO] 
[INFO] --- maven-jar-plugin:3.2.0:jar (default-jar) @ 
xwiki-platform-wiki-test-docker ---
[INFO] Building jar: 
/Users/vmassol/dev/xwiki/xwiki-platform/xwiki-platform-core/xwiki-platform-wiki/xwiki-platform-wiki-test/xwiki-platform-wiki-test-docker/target/xwiki-platform-wiki-test-docker-12.5-SNAPSHOT.jar
[INFO] 
[INFO] --- maven-failsafe-plugin:2.22.2:integration-test (functional-tests) @ 
xwiki-platform-wiki-test-docker ---
[INFO] 
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.xwiki.wiki.test.ui.AllIT
...
{noformat}

So what I don't get is why the surefire plugin is interpreting {{-Dit.test}}. 
It shouldn't! :)



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