mercredi 12 février 2020

Creating integration tests in a monolithic SpringBoot application

I was asked to create an integration test for a service within a very large SpringBoot project yielding dozens of implemented services. When the application is executed all of these services are deployed - I want to avoid deploying all services unrelated with the one for which I'm creating the test. Unfortunately, I do not (yet) have as much experience with spring boot tests as I would hope for hence I was wondering what is the best approach to address this.

I was thinking about annotating all unrelated services with @MockBean annotation and all related ones with @Autowire inside the test class, but I'm not sure if this is the proper way to go. Can anyone point me in the right direction?

Thank you.

Aucun commentaire:

Enregistrer un commentaire