This is an alternative approach to generate JUnit files for your CI (e.g. Jenkins) without parsing the
xcodebuild output, but using the Xcode
plist files instead.
trainer is a more robust and faster approach to generate JUnit reports for your CI system.
trainer, the Twitter iOS code base now generates JUnit reports 10 times faster.
|Generate JUnit reports|
|Generate HTML reports|
|Works when the
|Show test execution duration|
More information about the why
trainer is useful can be found on my blog.
Update to the latest fastlane and run
fastlane add_plugin trainer
Now add the following to your
lane :test do scan(scheme: "ThemojiUITests", output_types: "", fail_build: false) trainer(output_directory: ".") end
This will generate the JUnit file in the current directory. You can specify any path you want, just make sure to have it clean for every run so that your CI system knows which one to pick.
If you use circle, use the following to automatically publish the JUnit reports
For more information, check out the fastlane plugin docs.
Add this to your
Alternatively you can install the gem system-wide using
sudo gem install trainer.
If you use
fastlane, check out the official fastlane plugin on how to use
cd [project] scan --derived_data_path "output_dir"
Convert the plist files to junit
You can also pass a custom directory containing the plist files
trainer --path ./something
For more information run
Show the test results right in your pull request
After the lobbying of @steipete and the comment
How does Xcode Server parse the results?
I started investigating alternative approaches on how to parse test results.
For more information about the plist files that are being used, check out Michele's blog post.