mardi 18 décembre 2018

Spring Boot client package integration testing in multi-module project

My Gradle+Spring Boot 2+Spring 5 project has the following modules/subprojects:

  • web – the Spring Boot web app
  • core – some common classes (DTO)
  • api – a library/SDK for client apps to make calls against the Spring Boot app in web. Depends only on core, jackson, and requests.

For testing of the api module, I'd like to spin up the web app and make calls against it. I know how to use the @SpringBootTest annotation inside my web module to boot Spring, but how can I do the same inside the api module, which has no dependency on Spring (or web) at all?

Aucun commentaire:

Enregistrer un commentaire