Я изо всех сил пытаюсь получить версию 2.22.0 maven-surefire-plugin для запуска тестовых комплектов junit.
Наборы определяются аннотациями junit5
@RunWith(JUnitPlatform.class)
@SelectClasses({
SetupTest.class,
SessionTest.class,
})
public class APITests {
}
Или junit4
@RunWith(ProgressSuite.class)
@SuiteClasses({
CountryTest.class,
PaymentTypeTest.class,
})
public class APITests {
}
Оба случая приводят к тому, что верный поиск не находит тестов и выдает ошибку
[ОШИБКА] Не удалось выполнить цель org.apache.maven.plugins: maven-surefire-plugin: 2.22.0: test (default-test) в проектеинтеграции проекта: Тесты не выполнялись!
Если я просто запускаю один из тестовых классов напрямую, это отлично работает.До этого попытки обновления до surefire-plugin 2.22 более старая версия 2.19.1 могла нормально запускать эти «комплекты».
Кто-нибудь получил какие-нибудь идеи о том, как я могу продолжать использовать свои комплекты?
Соответствующие части POM ниже.
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<id>SureFireParseReportAndStore</id>
<phase>post-integration-test</phase>
<goals>
<goal>java</goal>
</goals>
<configuration>
<mainClass>surefireReporting.SureFireParseReportAndStore</mainClass>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<nonFilteredFileExtensions>
<nonFilteredFileExtension>exe</nonFilteredFileExtension>
</nonFilteredFileExtensions>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>repo.jenkins-ci.org</id>
<url>http://repo.jenkins-ci.org/public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>org.exparity</groupId>
<artifactId>hamcrest-date</artifactId>
<version>1.1.0</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.3.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.3.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>5.3.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.3.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<version>1.3.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-runner</artifactId>
<version>1.3.1</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.maven.surefire/surefire-report-parser -->
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-report-parser</artifactId>
<version>2.19.1</version>
</dependency>
</dependencies>