Skip to content
Sharp

Testing · interview question

In a Gradle project, how can you ensure that integration tests are only run after unit tests have passed?

Multiple choiceHardchapter-10-curatedpremiumtestingintegration-testing
Choose one answer
Answer and explanation

Correct answer

D. Define task dependencies so that integration tests depend on unit test completion.

Why

In Gradle, you can define task dependencies to ensure that unit tests must pass before the integration tests are run. This ensures that any failed unit tests block integration tests from executing.

Test yourself on Testing

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

Start free test
All Testing questions →