xcresult_to_junit plugin
Getting Started
This project is a fastlane plugin. To get started with fastlane-plugin-xcresult_to_junit
, add it to your project by running:
fastlane add_plugin xcresult_to_junit
About xcresult_to_junit
This plugin produces junit xml files from Xcode 11+ xcresult files.
This tool is not designed to work with result files produced with xcode versions older than xcode 11.
My main motivation behind creating my own solution was to have a plugin that works in a variety of testing scenarios. The below table captures the current requirements this plugin meets. If you have a requirement that is not met by this plugin and would like to contribute then please feel free 🤘
Requirement | Status |
---|---|
Works against one iOS device | ✅ |
Works against multiple iOS device | ✅ |
Generates one junit report per target | ✅ |
Works with modern formats (Xcode 11+) | ✅ |
Example
Check out the example Fastfile
to see how to use this plugin. Try it by cloning the repo, running fastlane install_plugins
and bundle exec fastlane test
.
Ensure you specify the following when you call scan
fail_build: false, # Allows to continue after scan
result_bundle: true # Generate xcresult in output directory
After scan you can call the plugin, which will look something like this
xcresult_to_junit(xcresult_path: './fastlane/test_output/MyScheme.test_result.xcresult', output_path: './fastlane/test_output/')
We can get a list of the junit reports generated by doing something like so
junit_reports = Dir['./test_output/*.junit']
# Now we can iterate over the reports and send them where they need to go
# My test_output folder would ideally have been cleaned before this test run to avoid old results
Run tests for this plugin
To run both the tests, and code style validation, run
rake
To automatically fix many of the styling issues, use
rubocop -A
Issues and Feedback
For any other issues and feedback about this plugin, please submit it to this repository.
Troubleshooting
If you have trouble using plugins, check out the Plugins Troubleshooting guide.
Using fastlane Plugins
For more information about how the fastlane
plugin system works, check out the Plugins documentation.
About fastlane
fastlane is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out fastlane.tools.