Fail build if no surefire reports found?

Hi,

We are using TeamCity 6.0 and have configured our build with Surefire XML report processing, report paths = integration-tests/target/surefire-reports/*.xml

We've got a problem that a static intializer in a JUnit test suite is causing Surefire to exit without writing out any XML reports, only an empty TEST....txt file. We have maven configured with -Dmaven.test.failure.ignore=true and are relying on the XML reports to determine build success - this is so all our modules build even if there are test failures.

Is it possible for TeamCity to fail the build if no surefire reports are found?

Obviously we could get maven to not ignore errors, but if the XML test reporting are intended to be used to determine build success, then the absence of these reports should be able to fail the build.

Alex

1 comment
Comment actions Permalink

Hi Alex

That's not supported directly yet, please vote for TW-18392.
Right now you can add such check into your build script and fail a build by service messages.

0

Please sign in to leave a comment.