Skip to content
CodeKruPro

Failing tests and the Maven exit code

QuizMediumJava onlyAsked in: Capgemini, Google, Salesforce, TCS, Zupee

Two tests fail during mvn test. Which statements are true? Choose all that apply.

  • Maven prints BUILD FAILURE and exits with a non-zero code (1), so the CI step fails
  • With -Dmaven.test.failure.ignore=true Maven reports the failures but prints BUILD SUCCESS and exits with 0
  • Surefire still writes XML reports to target/surefire-reports
  • Maven retries failed tests three times by default

This question is part of Pro+

Pro+ opens every question in Interview Prep and the mock interview. Every article and the first 2 questions of each topic stay free. Hands-on Selenium and API tasks follow their course lesson's own lock.

See Pro+

Already have Pro+? Sign in