You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
Failures in my JUnit test results are not recognized by Bitbucket Pipelines. The results file is created via fastlane (swiftlint) and looks like this:
<?xml version="1.0" encoding="utf-8"?>
<testsuites><testsuite>
<testcase classname='Formatting Test' name='SomeSwiftFile.swift'>
<failure message='Lines should not have trailing whitespace.'>warning: Line:15 </failure>
</testcase>
</testsuite></testsuites>
I also tried an different example file which looks like this:
<testsuite tests="3">
<testcase classname="foo1" name="ASuccessfulTest"/>
<testcase classname="foo2" name="AnotherSuccessfulTest"/>
<testcase classname="foo3" name="AFailingTest">
<failure type="NotEnoughFoo"> details about failure </failure>
</testcase>
</testsuite>
It looks like that both files are recognized as junit result files but the failures are not recognized. Take a look at the Bitbucket Pipelines result:
Any ideas whats wrong here?
I think I figured it out, the problem is, that the xml needs the following properties:
<testsuite tests="3" skipped="0" failures="1" errors="0">
<testsuite tests="3" skipped="0" failures="1" errors="0">
<testcase classname="foo1" name="ASuccessfulTest"/>
<testcase classname="foo2" name="AnotherSuccessfulTest"/>
<testcase classname="foo3" name="AFailingTest">
<failure type="NotEnoughFoo"> details about failure </failure>
</testcase>
</testsuite>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.