All Projects → fastlane-community → Trainer

fastlane-community / Trainer

Licence: mit
Convert xcodebuild plist and xcresult files to JUnit reports

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Trainer

Myapp
React Native 工程实践
Stars: ✭ 83 (-61.57%)
Mutual labels:  fastlane
Nearbyweather
NearbyWeather is an open source weather app for iOS, which uses the OpenWeatherMap API. With this project developers are invited to learn advanced iOS concepts, as well as to contribute further advancements. Fork this repo to get started.
Stars: ✭ 146 (-32.41%)
Mutual labels:  fastlane
Fastlane Plugin Changelog
Automate changes to your project CHANGELOG.md
Stars: ✭ 176 (-18.52%)
Mutual labels:  fastlane
Examples
📝 A collection of example fastlane setups
Stars: ✭ 1,289 (+496.76%)
Mutual labels:  fastlane
Autobahn
CLI tool written in Swift heavily inspired by https://github.com/fastlane/fastlane
Stars: ✭ 116 (-46.3%)
Mutual labels:  fastlane
Upcomingmovies
Movies app written in Swift 5 using the TMDb API and demonstrating Clean Architecture, Dependency Injection, MVVM and Coordinators.
Stars: ✭ 160 (-25.93%)
Mutual labels:  fastlane
Fastlane Plugin Google drive
fastlane plugin to upload files to Google Drive
Stars: ✭ 39 (-81.94%)
Mutual labels:  fastlane
App
An easy way to connect with fellow developers during WWDC
Stars: ✭ 188 (-12.96%)
Mutual labels:  fastlane
Fastfiles
Fastlane fastfile examples and custom actions
Stars: ✭ 138 (-36.11%)
Mutual labels:  fastlane
React Native Boilerplate
A React Native template for building solid applications 🐙, using JavaScript 💛 or Typescript 💙 (you choose).
Stars: ✭ 2,669 (+1135.65%)
Mutual labels:  fastlane
Fastlane Plugin Cordova
Integrate your Cordova build into your Fastlane setup
Stars: ✭ 100 (-53.7%)
Mutual labels:  fastlane
Presently
Android app for recording gratitude journal entries
Stars: ✭ 109 (-49.54%)
Mutual labels:  fastlane
Xcfit
Full Stack Protocol Oriented BDD in Xcode for iOS app with Swift using XCUITest, Cucumberish and FitNesse
Stars: ✭ 170 (-21.3%)
Mutual labels:  fastlane
Stepik Ios
iOS Application for Taking Open Courses on the Stepik Platform
Stars: ✭ 84 (-61.11%)
Mutual labels:  fastlane
Android Kotlin Modulerized Cleanarchitecture
🚀 Example modularized android application with single activity written in Kotlin
Stars: ✭ 180 (-16.67%)
Mutual labels:  fastlane
Kotlin Android Fastlane Firebase App Distribution
A repository that shows how to use Firebase App Distribution to distribute android app to testers by fastlane.
Stars: ✭ 77 (-64.35%)
Mutual labels:  fastlane
Clendar
Clendar - universal calendar app. Written in SwiftUI. Available on App Store
Stars: ✭ 153 (-29.17%)
Mutual labels:  fastlane
Fastlane Plugin Test center
🎯 The best fastlane plugin to understand and tame misbehaving iOS tests 🎉
Stars: ✭ 214 (-0.93%)
Mutual labels:  fastlane
Letteravatarkit
📦 An extension that generates letter-based avatars/placeholders
Stars: ✭ 180 (-16.67%)
Mutual labels:  fastlane
Swifthub
GitHub iOS client in RxSwift and MVVM-C clean architecture
Stars: ✭ 2,330 (+978.7%)
Mutual labels:  fastlane

trainer

Twitter: @KrauseFx License Gem

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 or xcresult files instead.

Some Xcode versions has a known issue around not properly closing stdout (Radar), so you can't use xcpretty.

trainer is a more robust and faster approach to generate JUnit reports for your CI system.

By using trainer, the Twitter iOS code base now generates JUnit reports 10 times faster.

xcpretty trainer
Prettify the xcodebuild output 🚫
Generate JUnit reports
Generate HTML reports 🚫
Works when the xcodebuild output format changed 🚫
Show test execution duration
Speed 🚗 🚀

xcpretty is a great piece of software that is used across all fastlane tools. trainer was built to have the minimum code to generate JUnit reports for your CI system.

More information about the why trainer is useful can be found on my blog.

Use with fastlane

Update to the latest fastlane and run

fastlane add_plugin trainer

Now add the following to your Fastfile

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

trainer(output_directory: ENV["CIRCLE_TEST_REPORTS"])

For more information, check out the fastlane plugin docs.

Without fastlane

Installation

Add this to your Gemfile

gem trainer

and run

bundle install

Alternatively you can install the gem system-wide using sudo gem install trainer.

Usage

If you use fastlane, check out the official fastlane plugin on how to use trainer in fastlane.

Run tests

cd [project]
fastlane scan --derived_data_path "output_dir"

Convert the plist or xcresult files to junit

trainer

You can also pass a custom directory containing the plist or xcresult files

trainer --path ./something

For more information run

trainer --help

Show the test results right in your pull request

To make it easier for you and your contributors to see the test failures, you can use danger with the danger-junit plugin to automatically post the test failures on the GitHub PR.

Thanks

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].