Sharing common Springboot integration tests with a jar?

Can I have a jar containing Springboot integration tests and use this jar in other modules to run general integration tests?

+4
source share
1 answer

As indicated here :

Maven projects already define the standard for design tests. And in my opinion, it makes no sense to make the project dependent on its tests - if anything, the tests will depend on the module being tested, since the tests use the module, but not vice versa.

, , : , . :

Maven . maven-surefire-plugin 2.15 Maven, . . , :

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>2.15</version>
    <configuration>
        <dependenciesToScan>
            <dependency>test.jar.group:test.jar.artifact.id</dependency>
        </dependenciesToScan>
    </configuration>
</plugin>
0

Source: https://habr.com/ru/post/1672788/


All Articles