PistolPete
PistolPete

Reputation: 784

Missing failure tags in Jenkins test report

The test reports (**/test-results/*.xml) produced during a Jenkins run does not contain any failure tags <failure message="some message" type="Failure"> for the failing tests.

The testsuite tag however acknowledges the failing tests and provides the amount of failures.

This problem results in Jenkins jobs not able to present any failing test runs. Currently all jobs look like they have passed. I suspect that the cause of this has something to do with the upgrade to Xcode 8.

Anyone else seen this or know the cause?

Upvotes: 0

Views: 353

Answers (1)

Raul
Raul

Reputation: 41

Seems like a known bug in the latest XCode plugin for Jenkins as you've posted.

One workaround you can do is to install xcpretty on your build server and use that for formatting your test results from xcode.

I was getting your issue with XCode 8 with UI automation test failures not being correctly populated into XML results in Jenkins and fixed it by removing the XCode plugin and instead just building via Execute Shell instead.

/usr/bin/xcodebuild -scheme "YourScheme" -workspace YourWorkspace.xcworkspace -configuration Debug build test | xcpretty -r junit

This will dump your XML test results into build/reports/*.xml and you view them in your Jenkins jobs from there.

Upvotes: 1

Related Questions