Interview Prep Zoneby CuriouserLabs
🧪

Testing Strategies

Slices vs full context, Testcontainers, context caching and testing the behaviors that actually break in prod.

  1. 1

    @SpringBootTest vs test slices (@WebMvcTest, @DataJpaTest) — how do you structure a service's test suite?

    senior
  2. 2

    @MockitoBean, mocking discipline, and where mocks end and fakes/containers begin.

    senior
  3. 3

    How do you use Testcontainers well? H2-vs-real-database, @ServiceConnection, and CI performance.

    staff
  4. 4

    Your integration suite takes 20 minutes. Explain Spring's test context caching and how you'd fix the suite.

    staff
  5. 5

    How do you test transactional behavior, @Async and event-driven flows — the things that only break in production?

    architect