unit testing - Spring Boot Test- How to avoid spawning srver -


requirement have spring boot application , respective unit , integration tests. since tests relying setup part time consuming, need do-

  1. invoke selective tests
  2. tests should invoked within pre-configured test server

what tried got know surefire plugin configured 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 see test server gets started execute testes. difference is, because of above configuration uses same pid (used mvn test). ask is there way run spring boot test cases without starting test server , should use pre-configured test server.


Comments