fastlane-plugin-bluepillarx 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 678cdf1452ce066f7a1732052c498f02f6795a1f
4
+ data.tar.gz: 11da0274758ee1197d2a0611142d9420081faa8e
5
+ SHA512:
6
+ metadata.gz: 9a4a77b2eeaf192fae3e455b7be716b50d87b6e5809be72c38cfc4406bc8bcddb9a0ecfb7ae7cc656a95a32f511ecaa225adbd825c5be9d9a6877d45455e1d8b
7
+ data.tar.gz: a666b07702f94ea923b0ac172a2c0a3eceff2605336a503043b5a2d33c59d996093237adce92aafcbef47f61bcaa98837bfe3c123b5b39052cfe09c55bce2487
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2017 Shashikant86 <shashikant.jagtap@icloud.com>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,125 @@
1
+ # bluepillarx plugin
2
+
3
+ Based on the old bluepillar
4
+
5
+ [![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-bluepillarx)
6
+
7
+ <a href="https://travis-ci.org/jterhorst/fastlane-plugin-bluepillarx/"><img src="https://img.shields.io/travis/jterhorst/fastlane-plugin-bluepillarx.svg" /></a>
8
+
9
+ ## Getting Started
10
+
11
+ This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin to run XCUI Tests in parallel using Linkedin's Bluepill tool. To get started with `fastlane-plugin-bluepillarx`, add it to your project by running:
12
+
13
+
14
+
15
+ ```bash
16
+ fastlane add_plugin bluepillarx
17
+ ```
18
+
19
+
20
+ ### Pre-requisite
21
+
22
+ [Bluepill](https://github.com/linkedin/bluepill) homebrew package doesn't work well as it's lacking `bp` binary.
23
+ We have to manually download `bluepill` and `bp` binaries from the Bluepill releases page on [Github](https://github.com/linkedin/bluepill/releases) 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.
24
+
25
+ ### Fastlane Setup
26
+
27
+ We can setup Fastlane using some BluePill optins and Derived data.
28
+
29
+ ##### BluePill Options
30
+
31
+ 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
32
+
33
+ * `app` : PATH to your application. This is usually in the derived data `/Products/Debug-iphonesimulator/YOUR_APP.app`
34
+
35
+ * `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.
36
+
37
+ * `scheme_path` : This is path to your scheme. This is usually in the `YOUR_PROJECT.xcodeproj/xcshareddata/xcschemes/YOUR_SCHEME.xcscheme`
38
+
39
+ * `output_dir` : This is a directory where Bluepill will generate reports.
40
+
41
+ * `num_sims` : Number of simulators to be launched.
42
+
43
+ * `runtime` : The iOS version we want to run test against. Note we have to pass it as nested string like this `'"iOS 10.3"'`
44
+
45
+ * `device`: The simulator to be used. We have to pass it as `'iPad Air'` or `'iPhone 6'`
46
+
47
+ ##### Generate Derived Data for Bluepill
48
+
49
+ It's good idea to generate derived data in the project itself using `build for testing` option.
50
+ You can do that using Fastlane `scan` like this
51
+
52
+ ```
53
+ scan(
54
+ scheme: YOUR_SCHEME,
55
+ build_for_testing: true,
56
+ derived_data_path: "./bluepill",
57
+ buildlog_path: "./bluepill/logs/"
58
+ )
59
+ ```
60
+ This will generate derived data inside `bluepill` directory.
61
+
62
+ ##### Configure Fastfile
63
+ Now that, all the Bluepill options are in place and we have generated derived data, we can configure lane in our `Fastfile` like this:
64
+
65
+ ```
66
+
67
+ lane :test do
68
+ app: 'bluepill/Build/Products/Debug-iphonesimulator/Bluepillar.app',
69
+ runner_app_path: 'bluepill/Build/Products/Debug-iphonesimulator/BluepillarUITests-Runner.app',
70
+ scheme_path: 'Bluepillar.xcodeproj/xcshareddata/xcschemes/Bluepillar.xcscheme',
71
+ output_dir: 'bluepill_output/',
72
+ num_sims: '3',
73
+ runtime: '"iOS 10.3"',
74
+ device: 'iPad Air'
75
+ end
76
+
77
+ ```
78
+ Now that we can run test using fastlane like this :
79
+
80
+ $ fastlane test
81
+
82
+
83
+
84
+ ## About bluepillar
85
+
86
+ Run XCUITests in Parallel using Bluepill. [Bluepill](https://github.com/linkedin/bluepill) is a tool from LinkedIn to run XCUI tests in the parallel.
87
+
88
+
89
+ ## Example
90
+
91
+ There is sample example project available on Github [Bluepillar-Demo](https://github.com/Shashikant86/Bluepillar-Demo). Just clone it, replace the path to derived data and run
92
+
93
+
94
+ $ git clone git@github.com:Shashikant86/Bluepillar-Demo.git
95
+ $ bundle install
96
+ $ bundle exec fastlane test
97
+
98
+ You can see sample report in the `sample_bluepill_output` directory.
99
+
100
+
101
+
102
+ ## Run tests for this plugin
103
+
104
+ To run both the tests, and code style validation, run
105
+
106
+ ```
107
+ rake
108
+ ```
109
+
110
+ To automatically fix many of the styling issues, use
111
+ ```
112
+ rubocop -a
113
+ ```
114
+
115
+ ## Issues and Feedback
116
+
117
+ For any other issues and feedback about this plugin, please submit it to this repository.
118
+
119
+ ## Troubleshooting
120
+
121
+ If you have trouble using plugins, check out the [Plugins Troubleshooting](https://docs.fastlane.tools/plugins/plugins-troubleshooting/) guide.
122
+
123
+ ## Using _fastlane_ Plugins
124
+
125
+ For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://docs.fastlane.tools/plugins/create-plugin/).
@@ -0,0 +1,16 @@
1
+ require 'fastlane/plugin/bluepillarx/version'
2
+
3
+ module Fastlane
4
+ module Bluepillarx
5
+ # Return all .rb files inside the "actions" and "helper" directory
6
+ def self.all_classes
7
+ Dir[File.expand_path('**/{actions,helper}/*.rb', File.dirname(__FILE__))]
8
+ end
9
+ end
10
+ end
11
+
12
+ # By default we want to import all available actions and helpers
13
+ # A plugin can contain any number of actions and plugins
14
+ Fastlane::Bluepillarx.all_classes.each do |current|
15
+ require current
16
+ end
@@ -0,0 +1,132 @@
1
+ module Fastlane
2
+ module Actions
3
+ class BluepillarxAction < Action
4
+ BLUEPILL_PATH = '/usr/local/bin/bluepill'
5
+ BP_PATH = '/usr/local/bin/bp'
6
+ def self.run(params)
7
+ UI.message("Starting XCTests using the bluepillarx fastlane plugin!")
8
+ unless File.exist?(BLUEPILL_PATH)
9
+ UI.user_error!("You must download bluepill binary from Github and put it in /usr/local/bin/bluepill to carry on execution")
10
+ end
11
+
12
+ unless File.exist?(BP_PATH)
13
+ UI.user_error!("You must download bp binary from Github and put it in /usr/local/bin/bp to carry on execution")
14
+ end
15
+
16
+ bluepill_app_path = params[:app]
17
+ bluepill_runner_app_path = params[:runner_app_path]
18
+ bluepill_scheme_path = params[:scheme_path]
19
+ bluepill_num_sims = params[:num_sims]
20
+ bluepill_output_dir = params[:output_dir]
21
+ bluepill_runtime = params[:runtime]
22
+ bluepill_device = params[:device]
23
+
24
+ bluepill_config_path = params[:config_path]
25
+
26
+
27
+ command = [
28
+ 'bluepill'
29
+ ]
30
+
31
+ command.concat ['-a', bluepill_app_path] if bluepill_app_path
32
+ command.concat ['-s', bluepill_scheme_path] if bluepill_scheme_path
33
+ command.concat ['-o', bluepill_output_dir] if bluepill_output_dir
34
+ command.concat ['-r', bluepill_runtime] if bluepill_runtime
35
+ command.concat ['-n', bluepill_num_sims] if bluepill_num_sims
36
+ if bluepill_device
37
+ processed_device = bluepill_device.gsub(/ /, '\ ')
38
+ command.concat ['-d', processed_device] if processed_device
39
+ end
40
+ command.concat ['-c', bluepill_config_path] if bluepill_config_path
41
+ command.concat ['-u', bluepill_runner_app_path] if bluepill_runner_app_path
42
+
43
+ Actions.sh(command.join(' '))
44
+ end
45
+
46
+ def self.description
47
+ "Run XCUITests in Parallel using Bluepill"
48
+ end
49
+
50
+ def self.authors
51
+ ["Shashikant86", "jterhorst"]
52
+ end
53
+
54
+ def self.return_value
55
+
56
+ end
57
+
58
+ def self.details
59
+ "This plugin will allow you to run XCUITests in Parallel using LinkedIn's Bluepil"
60
+ end
61
+
62
+ def self.available_options
63
+ [
64
+ FastlaneCore::ConfigItem.new(key: :app,
65
+ env_name: "BLUEPILLAR_APP_PATH",
66
+ description: "Path to the main app to be build for the bluepill in the Derived Data",
67
+ is_string: true,
68
+ optional: true),
69
+
70
+ FastlaneCore::ConfigItem.new(key: :runner_app_path,
71
+ env_name: "BLUEPILLAR_RUNNER_APP_PATH",
72
+ description: "Path to the test runner app in the Derived Data",
73
+ is_string: true,
74
+ optional: true),
75
+
76
+ FastlaneCore::ConfigItem.new(key: :scheme_path,
77
+ env_name: "BLUEPILLAR_XCTEST_SCHEME_PATH",
78
+ description: "Path to the scheme to be build for the bluepill in the .xcodeproj",
79
+ is_string: true,
80
+ optional: true),
81
+
82
+ FastlaneCore::ConfigItem.new(key: :output_dir,
83
+ env_name: "BLUEPILLAR_REPORT_PATH",
84
+ description: "Path to store simulator logs and test reports",
85
+ is_string: true,
86
+ optional: true),
87
+
88
+ FastlaneCore::ConfigItem.new(key: :num_sims,
89
+ env_name: "BLUEPILLAR_SUMULATORS",
90
+ description: "Number of sumulators to be launched",
91
+ is_string: true,
92
+ optional: true),
93
+
94
+ FastlaneCore::ConfigItem.new(key: :runtime,
95
+ env_name: "BLUEPILLAR_IOS_VERSION",
96
+ description: "The iOS version to be used for testing",
97
+ is_string: true,
98
+ optional: true),
99
+
100
+ FastlaneCore::ConfigItem.new(key: :device,
101
+ env_name: "BLUEPILLAR_IOS_DEVICE",
102
+ description: "The iOS device to be used for testing",
103
+ is_string: true,
104
+ optional: true),
105
+
106
+ FastlaneCore::ConfigItem.new(key: :config_path,
107
+ env_name: "BLUEPILLAR_CONFIG_PATH",
108
+ description: "Path for Bluepill config file",
109
+ is_string: true,
110
+ optional: true),
111
+ ]
112
+ end
113
+
114
+ def self.example_code
115
+ [' bluepillarx(
116
+ app: "bluepill/Build/Products/Debug-iphonesimulator/Bluepillar.app",
117
+ runner_app_path: "bluepill/Build/Products/Debug-iphonesimulator/BluepillarUITests-Runner.app",
118
+ scheme_path: "Bluepillar.xcodeproj/xcshareddata/xcschemes/Bluepillar.xcscheme",
119
+ output_dir: "bluepill_output/",
120
+ num_sims: "3",
121
+ runtime: '"iOS 10.3"',
122
+ )
123
+ ']
124
+ end
125
+
126
+ def self.is_supported?(platform)
127
+ [:ios, :mac].include?(platform)
128
+ true
129
+ end
130
+ end
131
+ end
132
+ end
@@ -0,0 +1,12 @@
1
+ module Fastlane
2
+ module Helper
3
+ class BluepillarxHelper
4
+ # class methods that you define here become available in your action
5
+ # as `Helper::BluepillarHelper.your_method`
6
+ #
7
+ def self.show_message
8
+ UI.message("Hello from the bluepillarx plugin helper!")
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,5 @@
1
+ module Fastlane
2
+ module Bluepillarx
3
+ VERSION = "0.4.3"
4
+ end
5
+ end
metadata ADDED
@@ -0,0 +1,133 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: fastlane-plugin-bluepillarx
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.4.3
5
+ platform: ruby
6
+ authors:
7
+ - jterhorst
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2018-04-06 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: pry
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rubocop
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: fastlane
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: 2.26.1
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: 2.26.1
97
+ description:
98
+ email: jterhorst@icloud.com
99
+ executables: []
100
+ extensions: []
101
+ extra_rdoc_files: []
102
+ files:
103
+ - LICENSE
104
+ - README.md
105
+ - lib/fastlane/plugin/bluepillarx.rb
106
+ - lib/fastlane/plugin/bluepillarx/actions/bluepillarx_action.rb
107
+ - lib/fastlane/plugin/bluepillarx/helper/bluepillarx_helper.rb
108
+ - lib/fastlane/plugin/bluepillarx/version.rb
109
+ homepage: https://github.com/jterhorst/fastlane-plugin-bluepillarx
110
+ licenses:
111
+ - MIT
112
+ metadata: {}
113
+ post_install_message:
114
+ rdoc_options: []
115
+ require_paths:
116
+ - lib
117
+ required_ruby_version: !ruby/object:Gem::Requirement
118
+ requirements:
119
+ - - ">="
120
+ - !ruby/object:Gem::Version
121
+ version: '0'
122
+ required_rubygems_version: !ruby/object:Gem::Requirement
123
+ requirements:
124
+ - - ">="
125
+ - !ruby/object:Gem::Version
126
+ version: '0'
127
+ requirements: []
128
+ rubyforge_project:
129
+ rubygems_version: 2.2.2
130
+ signing_key:
131
+ specification_version: 4
132
+ summary: Fastlane Plugin to Run XCUITests in Parallel using Bluepill.
133
+ test_files: []