Skip to content
Sharp

Project Structure · interview question

Why might you choose to use integration tests despite their higher resource cost compared to unit tests?

Multiple choiceHardchapter-10-curatedpremiumproject-structurejava-modules-jpms
Choose one answer
Answer and explanation

Correct answer

A. They ensure the entire application stack works together

Why

Integration tests validate that the entire application stack, including databases and external services, work as expected when integrated. This is crucial for catching issues that unit tests, which isolate individual components, might miss.

Test yourself on Project Structure

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

Start free test
All Project Structure questions →