2021年1月21日星期四

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?
https://stackoverflow.com/questions/65837481/start-the-integrationtest-by-calling-rest-endpoint-in-springboot January 22, 2021 at 07:55AM

没有评论:

发表评论