You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Alexei Vinogradov (JIRA)" <ji...@apache.org> on 2018/07/11 14:46:00 UTC
[jira] [Updated] (SUREFIRE-1536) Surefire doesn't discovery JUnit5
Tests, when classname has no *Test* in its name.
[ https://issues.apache.org/jira/browse/SUREFIRE-1536?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexei Vinogradov updated SUREFIRE-1536:
----------------------------------------
Description:
{{*pom.xml*}}
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.2.0</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
<dependencies>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-surefire-provider</artifactId>
<version>1.2.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
public class Scenario {
@Test
public void test()
{ Assertions.assertEquals(4, 2 + 2); }
mvn test
finds no test. It is no more mandatory to name the test classes with Test in its name.
was:
{{*pom.xml*}}
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.2.0</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.21.0</version>
<dependencies>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-surefire-provider</artifactId>
<version>1.2.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
public class Scenario {
@Test
public void test()
{ Assertions.assertEquals(4, 2 + 2); }
mvn test
finds no test. It is no more mandatory to name the test classes with Test in its name.
> Surefire doesn't discovery JUnit5 Tests, when classname has no *Test* in its name.
> ----------------------------------------------------------------------------------
>
> Key: SUREFIRE-1536
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1536
> Project: Maven Surefire
> Issue Type: Bug
> Components: JUnit 5.x support
> Affects Versions: 2.22.0
> Reporter: Alexei Vinogradov
> Priority: Major
> Labels: junit5
>
> {{*pom.xml*}}
>
> <dependencies>
> <dependency>
> <groupId>org.junit.jupiter</groupId>
> <artifactId>junit-jupiter-engine</artifactId>
> <version>5.2.0</version>
> <scope>test</scope>
> </dependency>
> </dependencies>
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-surefire-plugin</artifactId>
> <version>2.22.0</version>
> <dependencies>
> <dependency>
> <groupId>org.junit.platform</groupId>
> <artifactId>junit-platform-surefire-provider</artifactId>
> <version>1.2.0</version>
> </dependency>
> </dependencies>
> </plugin>
> </plugins>
> </build>
> import org.junit.jupiter.api.Assertions;
> import org.junit.jupiter.api.DisplayName;
> import org.junit.jupiter.api.Test;
> public class Scenario {
> @Test
> public void test()
> { Assertions.assertEquals(4, 2 + 2); }
>
> mvn test
> finds no test. It is no more mandatory to name the test classes with Test in its name.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)