This project is a fastlane plugin to run XCUI Tests in parallel using Linkedin's Bluepill tool. To get started with
fastlane-plugin-bluepillar, add it to your project by running:
fastlane add_plugin bluepillar
Bluepill homebrew package doesn't work well as it's lacking
We have to manually download
bp binaries from the Bluepill releases page on Github and put in PATH. This plugin expect it inside
/usr/local/bin/ where all the other binaries live, so that we have
/usr/local/bin/bp binaries in place.
We can setup Fastlane using some BluePill optins and Derived data.
##### BluePill Options
There are so many options available for the Bluepill but we just need few of them to get going and keep other options as default. This plugin provides basic 7 options as follows
app: PATH to your application. This is usually in the derived data
runner_app_path: PATH to UI Test runner app. This is usually in derived data
/Products/Debug-iphonesimulator\YOUR_UITEST_SCHEME-Runner.appIf you have a space in the Scheme name then you have to amend it with backslash in your path.
scheme_path: This is path to your scheme. This is usually in the
output_dir: This is a directory where Bluepill will generate reports.
num_sims: Number of simulators to be launched.
runtime: The iOS version we want to run test against. Note we have to pass it as nested string like this
device: The simulator to be used. We have to pass it as
Generate Derived Data for Bluepill
It's good idea to generate derived data in the project itself using
build for testing option.
You can do that using Fastlane
scan like this
scan( scheme: YOUR_SCHEME, build_for_testing: true, derived_data_path: "./bluepill", buildlog_path: "./bluepill/logs/" )
This will generate derived data inside
Now that, all the Bluepill options are in place and we have generated derived data, we can configure lane in our
Fastfile like this:
lane :test do app: 'bluepill/Build/Products/Debug-iphonesimulator/Bluepillar.app', runner_app_path: 'bluepill/Build/Products/Debug-iphonesimulator/BluepillarUITests-Runner.app', scheme_path: 'Bluepillar.xcodeproj/xcshareddata/xcschemes/Bluepillar.xcscheme', output_dir: 'bluepill_output/', num_sims: '3', runtime: '"iOS 10.3"', device: 'iPad Air' end
Now that we can run test using fastlane like this :
$ fastlane test
Run XCUITests in Parallel using Bluepill. Bluepill is a tool from LinkedIn to run XCUI tests in the parallel.
There is sample example project available on Github Bluepillar-Demo. Just clone it, replace the path to derived data and run
$ git clone email@example.com:Shashikant86/Bluepillar-Demo.git $ bundle install $ bundle exec fastlane test
You can see sample report in the
Run tests for this plugin
To run both the tests, and code style validation, run
To automatically fix many of the styling issues, use
Issues and Feedback
For any other issues and feedback about this plugin, please submit it to this repository.
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.