Skip to content
Sharp

Testing · interview question

Why does the @SpringBootTest annotation in a test class matter in this design?

Multiple choiceMediumchapter-10-curatedpremiumtestingcontroller-testing
Choose one answer
Answer and explanation

Correct answer

D. To load the full application context for integration testing

Why

@SpringBootTest is used to load the full application context, making it suitable for integration tests where you need to verify how different parts of the application work together.

Test yourself on Testing

A free test with instant, explained results. No account needed.

Start free test
All Testing questions →