fastlane-plugin-xbluepill 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e04d8dc9e2e9a52225a2b69f0ed58b1acb4fa98c
4
- data.tar.gz: df5521cf0ddddb337dbadac239116cc9f0d17b4f
3
+ metadata.gz: d02dff6f4a8a8e4d64b371a817464c6ba4c4a853
4
+ data.tar.gz: 16264088892be5e493223c1266bb9745820b1bc3
5
5
  SHA512:
6
- metadata.gz: aabb968c7a494c50b8703e6bbfd345fc269982d4462fb512c13e47a9f18ca033e7e3cbd4172fa693d1d417e2df0bf725322ba1aa0b9965fad8be8c8a72933377
7
- data.tar.gz: 9b80d85ffd814cd896b3be1e9cf8065ff8f48c0029be32bc85c955e67b9274d8a259605b5a67614ce09298d3fd40d06d4a183a9a0aaba43d3dbb2eec671e47fc
6
+ metadata.gz: 8756e64ca90686e7c480dc6fd9f7f43a6889a0569bae8d7ce8ac563615da2de84797849361c2be64de7d7e33c6d12d2256034ba872d3bb7f756aeb3cce7c5475
7
+ data.tar.gz: 5eab011e3bfbdba43c604bcbf62161c072423aa0582d9c666caaba6964bfea765ef5ace77f9e4cf30d2a1b23e3dc8f34d57efad33e76fd069f17af23c1698f39
data/README.md CHANGED
@@ -12,9 +12,54 @@ fastlane add_plugin xbluepill
12
12
 
13
13
  ## About xbluepill
14
14
 
15
- It is a fastlane plugin that allows to use bluepill (linkedin library) as a fastlane command
15
+ It is a fastlane plugin that allows to use bluepill (linkedin library) as a fastlane command. It support latest XCode 9.2. There are some differences from other plugins:
16
+ - Supports XCode 9.2;
17
+ - No need to build your project before using the plugin. Builds you project by itself and put xctestrun file automatically;
18
+ - Can reset all simulators if needed (removes all current simulators and recreates default from scratch);
19
+
20
+ Supported options are almost the same as in [Bluepill](https://github.com/linkedin/bluepill). But there are some differences since plugin builds a project by itself:
21
+
22
+
23
+ | Config Arguments | Command Line Arguments | Explanation | Required | Default value |
24
+ |:----------------------:|:----------------------:|------------------------------------------------------------------------------------|:--------:|:----------------:|
25
+ | `app` | -a | The path to the host application to execute (your .app) | N | n/a |
26
+ | `workspace` | | The path to the `.xworkspace` of your project. NOTE: Required if no `project` option set. | N | n/a |
27
+ | `project` | | The path to the `.xcodeproj` of your project. NOTE: Required if no `workspace` option set. | N | n/a |
28
+ | `scheme` | | Your test scheme. | Y | n/a |
29
+ | `reset_simulators` | | Delete and re-create all iOS and tvOS simulators. | N | false |
30
+ | `output-dir` | -o | Directory where to put output log files (bluepill only) | Y | n/a |
31
+ | config | -c | Read options from the specified configuration file instead of the command line | N | n/a |
32
+ | device | -d | On which device to run the app. | N | iPhone 6 |
33
+ | exclude | -x | Exclude a testcase in the set of tests to run (takes priority over `include`). | N | empty |
34
+ | headless | -H | Run in headless mode (no GUI). | N | off |
35
+ | xcode-path | -X | Path to xcode. | N | xcode-select -p |
36
+ | include | -i | Include a testcase in the set of tests to run (unless specified in `exclude`). | N | all tests |
37
+ | json-output | -J | Print test timing information in JSON format. | N | off |
38
+ | junit-output | -j | Print results in JUnit format. | N | true |
39
+ | list-tests | -l | Only list tests in bundle | N | false |
40
+ | num-sims | -n | Number of simulators to run in parallel. (bluepill only) | N | 4 |
41
+ | plain-output | -p | Print results in plain text. | N | true |
42
+ | printf-config | -P | Print a configuration file suitable for passing back using the `-c` option. | N | n/a |
43
+ | error-retries | -R | Number of times to recover from simulator/app crashing/hanging and continue running| N | 5 |
44
+ | failure-tolerance | -f | Number of times to retry on test failures | N | 0 |
45
+ | only-retry-failed | -F | When `failure-tolerance` > 0, only retry tests that failed | N | false |
46
+ | runtime | -r | What runtime to use. | N | iOS 11.1 |
47
+ | stuck-timeout | -S | Timeout in seconds for a test that seems stuck (no output). | N | 300s |
48
+ | test-timeout | -T | Timeout in seconds for a test that is producing output. | N | 300s |
49
+ | test-bundle-path | -t | The path to the test bundle to execute (single .xctest). | N | n/a |
50
+ | additional-unit-xctests| n/a | Additional XCTest bundles that is not Plugin folder | N | n/a |
51
+ | additional-ui-xctests | n/a | Additional XCTUITest bundles that is not Plugin folder | N | n/a |
52
+ | repeat-count | -C | Number of times we'll run the entire test suite (used for load testing). | N | 1 |
53
+ | no-split | -N | Test bundles you don't want to be packed into different groups to run in parallel. | N | n/a |
54
+ | quiet | -q | Turn off all output except fatal errors. | N | YES |
55
+ | reuse-simulator | n/a | Enable reusing simulators between test bundles | N | NO |
56
+ | diagnostics | n/a | Enable collection of diagnostics in outputDir in case of test failures | N | NO |
57
+ | help | -h | Help. | N | n/a |
58
+ | runner-app-path | -u | The test runner for UI tests. | N | n/a |
59
+ | screenshots-directory | n/a | Directory where simulator screenshots for failed ui tests will be stored | N | n/a |
60
+ | video-paths | -V | A list of videos that will be saved in the simulators | N | n/a |
61
+ | image-paths | -I | A list of images that will be saved in the simulators | N | n/a |
16
62
 
17
- **Note to author:** Add a more detailed description about this plugin here. If your plugin contains multiple actions, make sure to mention them here.
18
63
 
19
64
  ## Example
20
65
 
@@ -6,20 +6,10 @@ module Fastlane
6
6
  module Actions
7
7
  class XbluepillAction < Action
8
8
  def self.run(params)
9
- puts(params)
10
9
  UI.message("The xbluepill plugin is working!")
11
10
 
12
- sh("rm -rf ./xbluepill")
13
- sh("rm -rf ./xbluepill_output")
14
-
15
- scan_options = {}
16
- scan_options[:workspace] = params[:workspace]
17
- scan_options[:scheme] = params[:scheme]
18
- scan_options[:build_for_testing] = true
19
- scan_options[:derived_data_path] = "./xbluepill"
20
- scan_options[:buildlog_path] = "./xbluepill/logs/"
21
- config = FastlaneCore::Configuration.create(Fastlane::Actions::ScanAction.available_options, scan_options)
22
- Fastlane::Actions::ScanAction.run(config)
11
+ perform_before_build_actions
12
+ perform_scan(params)
23
13
 
24
14
  xctestrun_path = Dir.glob("./xbluepill/Build/Products/*.xctestrun")[0].to_s
25
15
  app = Dir.glob("./xbluepill/Build/Products/Debug-*/*.app")[0].to_s
@@ -68,6 +58,23 @@ module Fastlane
68
58
  sh("xcrun simctl shutdown all ; export SNAPSHOT_FORCE_DELETE=true ; fastlane snapshot reset_simulators --force") if reset
69
59
  end
70
60
 
61
+ def self.perform_before_build_actions
62
+ sh("xcrun simctl shutdown all")
63
+ sh("rm -rf ./xbluepill")
64
+ sh("rm -rf ./xbluepill_output")
65
+ end
66
+
67
+ def self.perform_scan(params)
68
+ scan_options = {}
69
+ scan_options[:workspace] = params[:workspace].to_s.empty? ? params[:project] : params[:workspace]
70
+ scan_options[:scheme] = params[:scheme]
71
+ scan_options[:build_for_testing] = true
72
+ scan_options[:derived_data_path] = "./xbluepill"
73
+ scan_options[:buildlog_path] = "./xbluepill/logs/"
74
+ config = FastlaneCore::Configuration.create(Fastlane::Actions::ScanAction.available_options, scan_options)
75
+ Fastlane::Actions::ScanAction.run(config)
76
+ end
77
+
71
78
  def self.add_required_param(cmd, param_name, param_value)
72
79
  cmd << " #{param_name} '#{param_value}'"
73
80
  end
@@ -100,7 +107,7 @@ module Fastlane
100
107
  def self.return_value; end
101
108
 
102
109
  def self.details
103
- "Bluepill is powered by LinkedIn: https://github.com/linkedin/bluepill"
110
+ "XBluepill is powered by LinkedIn: https://github.com/linkedin/bluepill"
104
111
  end
105
112
 
106
113
  def self.available_options
@@ -114,7 +121,13 @@ module Fastlane
114
121
  FastlaneCore::ConfigItem.new(key: :workspace,
115
122
  env_name: "XBLUEPILL_workspace".upcase,
116
123
  description: "XCode workspace",
117
- optional: false,
124
+ optional: true,
125
+ type: String),
126
+
127
+ FastlaneCore::ConfigItem.new(key: :project,
128
+ env_name: "XBLUEPILL_project".upcase,
129
+ description: "XCode project file",
130
+ optional: true,
118
131
  type: String),
119
132
 
120
133
  FastlaneCore::ConfigItem.new(key: :reset_simulators,
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Xbluepill
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-xbluepill
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - UladzimirKisialiou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-26 00:00:00.000000000 Z
11
+ date: 2018-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry