If you’re running tests for your iOS code base on some kind of Continuous Integration, you usually have to generate a JUnit file to report the test results, including error information, to your CI system. Until now, the easiest solution was to use the amazing xcpretty, which parses the
xcodebuild output and converts it to something more readable, additionally to generating the JUnit report.
trainer is a simple standalone tool (that also contains a fastlane plugin), which does exactly that: Convert the plist files to JUnit reports.
By using trainer, the Twitter iOS code base now generates JUnit reports 10 times faster.
To start using trainer, just add the following to your Fastfile:
lane :test do scan(scheme: "ThemojiUITests", output_types: "", fail_build: false) trainer(output_directory: ".") end
For more information about when to use trainer, check out the full blog article on PSPDFKit.
Unless otherwise mentioned in the post, those projects are side projects which I work on on weekends and evenings, and are not affiliated with my work or employer.