Grokking Spring Boot
Vote

0% completed

​

Slice Tests

We counted the bean definitions in three test contexts of the booking service:

  • 285 in the full application context, started with @SpringBootTest.
  • 171 in a context started with @WebMvcTest for BookingController.
  • 90 in a context started with @DataJpaTest.

Neither of the two smaller contexts contained EventService. Each one held only the beans for one layer of the application, plus the Spring infrastructure that layer needs.

Such a partial context is called a slice

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content