title: @SpringBootTest Vs @WebMvcTest & @DataJpaTest &service unit tests, what is the best?
body: <p>I have a SpringBoot MVC application, and I want to cover it with tests.</p>
  <p>I have the controller, service and repository layers.</p>
  <p>What is the best practice to cover the application by tests?</p>
  <p>Why do people use <code>@SpringBootTest</code> while it seems it could be tested by layers by <code>@WebMvcTest</code> &amp; <code>@DataJpaTest</code> and service unit tests? It is faster and more granular, isn't it?</p>
  <p>AFAIK when <code>@SpringBootTest</code> is used it is called Integration tests, so does it mean it shouldn't appear too often?</p>
  <p>I suppose that every chunk of code should be unit test covered, is it the same for integration covered? Or should integration tests work on stage environment but not on test environment?</p>
  <p>Isn't it the same (in terms of performance) if I create a <code>@SpringBootTest</code> but mock other layers? (Suppose I create multiple <code>@SpringBootTest</code>s and mock other layers).</p>