Skip to content
Sharp

Testing · interview question

Why is it not recommended to include business logic in JUnit test methods?

Multiple choiceMediumchapter-10-curatedpremiumtestingunit-testing-with-junit
Choose one answer
Answer and explanation

Correct answer

A. Tests become harder to understand and maintain

Why

Including business logic in JUnit test methods can make the tests harder to understand and maintain. Test methods should focus on verifying existing logic rather than introducing new logic, ensuring clarity and simplicity.

Test yourself on Testing

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

Start free test
All Testing questions →