В целях отладки я попытался включить все тесты, и при этом отказоустойчиво только подхватывает один тест (ChangePriorityTest).Все тесты успешно компилируются в правильном целевом каталоге.
pom.xml
<project>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.8.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>at.test</groupId>
<artifactId>citest</artifactId>
<version>${revision}</version>
<name>citest</name>
<description>Test project to improve our CI pipeline</description>
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.5.2</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>
<!-- Plugins -->
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.22.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
</dependency>
</dependencies>
<profiles>
<profile>
<id>all-tests</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<skip.unit.tests>false</skip.unit.tests>
<skip.integration.tests>false</skip.integration.tests>
</properties>
</profile>
<profile>
<id>unit-tests</id>
<properties>
<skip.unit.tests>false</skip.unit.tests>
<skip.integration.tests>true</skip.integration.tests>
</properties>
</profile>
<profile>
<id>integration-tests</id>
<properties>
<skip.unit.tests>true</skip.unit.tests>
<skip.integration.tests>false</skip.integration.tests>
</properties>
</profile>
</profiles>
<reporting>
<plugins>
<!-- Unit test report -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.22.2</version>
<configuration>
</configuration>
</plugin>
</plugins>
</reporting>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<excludes>
<exclude>application.properties</exclude>
</excludes>
<filtering>false</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>${skip.unit.tests}</skipTests>
<excludes>
<exclude>**/*IntegrationTest.java</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<skipTests>${skip.integration.tests}</skipTests>
<includes>
<include>**/*</include>
</includes>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Структура каталога:
- src
|- test
|-- java
|--- at/test/citest
|---- domain/model/todo
|----- ChangePriorityTest
|---- interfaces/rest/todo
|----- TodoRestDocumentation
|---- TestIntegrationTest
Я попытался понизить версию, включая всетесты через **/*
.
Я что-то здесь упускаю?