jeudi 21 janvier 2021

Start the IntegrationTest by calling REST endpoint in SpringBoot

I am assuming this is possible and is not against standards / Bad Practice.

We are writing end to end tests in SpringBoot @SpringBootTest for Micro Services and this end to end tests are in a separate module / project (like a microservice).

Plan is to write a controller with an endpoint and takes a profile as param, to run the test @SpringBootTest programmatically.

Questions:

  1. How do we run the test the in the way specified above.
  2. Should we still keep the tests in src/test instead of src/main, since in the end to end spring boot application, all that it has is just a Test class (@SpringBootTest) with some helper classes?
  3. Any other better to organize this?

Aucun commentaire:

Enregistrer un commentaire