jeudi 1 septembre 2016

Spring Boot Test- How to avoid spawning srver

Requirement I have a spring boot application and respective unit and integration tests. Since my tests are relying setup part which is time consuming, i need to do-

  1. Invoke selective tests
  2. Tests should be invoked within pre-configured test server

What i tried I got to know about surefire plugin where i configured like below configuration-

        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.19.1</version>
        <configuration>
            <forkCount>0</forkCount>
            <reuseForks>true</reuseForks>
        </configuration>

But still i see test server gets started to execute the testes. Difference is, because of above configuration it uses same PID (used mvn test). So my ask is is there any way to run spring boot test cases without starting the test server and should use pre-configured test server.

Aucun commentaire:

Enregistrer un commentaire