GithubHelp home page GithubHelp logo

xcteq / fastlane-plugin-bluepillar Goto Github PK

View Code? Open in Web Editor NEW
10.0 3.0 2.0 197 KB

Fastlane plugin to run XCUI Test in the parallel using Bluepill

License: MIT License

Ruby 100.00%
bluepill fastlane fastlane-plugin homebrew xctest xcuitest

fastlane-plugin-bluepillar's Introduction

bluepillar plugin

fastlane Plugin Badge

Getting Started

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

Pre-requisite

Bluepill homebrew package doesn't work well as it's lacking bp binary. We have to manually download bluepill and 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/bluepill and /usr/local/bin/bp binaries in place.

Fastlane Setup

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 /Products/Debug-iphonesimulator/YOUR_APP.app

  • runner_app_path : PATH to UI Test runner app. This is usually in derived data /Products/Debug-iphonesimulator\YOUR_UITEST_SCHEME-Runner.app If 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 YOUR_PROJECT.xcodeproj/xcshareddata/xcschemes/YOUR_SCHEME.xcscheme

  • 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 '"iOS 10.3"'

  • device: The simulator to be used. We have to pass it as 'iPad Air' or 'iPhone 6'

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 bluepill directory.

Configure Fastfile

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

About bluepillar

Run XCUITests in Parallel using Bluepill. Bluepill is a tool from LinkedIn to run XCUI tests in the parallel.

Example

There is sample example project available on Github Bluepillar-Demo. Just clone it, replace the path to derived data and run

         $ git clone [email protected]:Shashikant86/Bluepillar-Demo.git
         $ bundle install
         $ bundle exec fastlane test

You can see sample report in the sample_bluepill_output directory.

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.

fastlane-plugin-bluepillar's People

Contributors

shashikant86 avatar yusukehosonuma avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

fastlane-plugin-bluepillar's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.