pizza
pizza

Reputation: 21

Keep Spring application on while performing tests

I'm in the process of writing tests (JUnit5) for a Spring + Hibernate (MySQL) application.

Every time i start a test (or suite of tests) the application starts, runs the tests then exits. The startup time is about 50 seconds so running tests multiple times - especially when writing and debugging the tests themselves - can be quite tiring; having to wait ~50secs every mvn test (or IntelliJ's test button) is not optimal.

So I'd like a way to sort of start the application once at the start of my dev session keep in running for the duration of all tests, that I can run as many times as I need, and manually shut it down when I want to.

Edit: I'm @Autowireing Spring services for integration tests so my tests are annotated with @SpringBootTest, I need the app to start.

Upvotes: 1

Views: 28

Answers (0)

Related Questions