fastlane-plugin-test_center 3.0.3 → 3.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +45 -12
- data/lib/fastlane/plugin/test_center/actions/multi_scan.rb +11 -5
- data/lib/fastlane/plugin/test_center/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d7c0149f00fe40b9abe8a9ef8ad122604866b485
|
4
|
+
data.tar.gz: 840aed439777798ec3a07a54b3da376cfb8d6be3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61c26927fb8e28626918ad55dc685bfafabf9612c85fac99df6cb948ab4e1de99472703f67ede2f614597486b5333c7536eb32c5b0facf6fbe19740c4250b573
|
7
|
+
data.tar.gz: b9b0312371c004b0f7dec02cef13b3d2e004dac56811a096d5d214e1b48920c570d59f22434990399093a1194cbe4a6ee4ec9957040f3cfb26baae083782ce7b
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# test_center plugin
|
1
|
+
# test_center plugin 🎯
|
2
2
|
|
3
3
|
[![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-test_center)
|
4
4
|
|
@@ -12,19 +12,52 @@ fastlane add_plugin test_center
|
|
12
12
|
|
13
13
|
## About test_center
|
14
14
|
|
15
|
-
This plugin makes testing your iOS app easier by providing you actions that
|
16
|
-
you to run the fastlane `scan` action multiple times and retrying only failed
|
17
|
-
tests, retrieve which tests failed during `scan`, and suppressing given tests in
|
18
|
-
an Xcode project.
|
15
|
+
This plugin makes testing your iOS app easier by providing you actions that give you greater control over everthing related to testing your app.
|
19
16
|
|
20
17
|
This fastlane plugin includes the following actions:
|
21
|
-
- `multi_scan
|
22
|
-
- `suppress_tests_from_junit
|
23
|
-
- `suppress_tests
|
24
|
-
- `suppressed_tests
|
25
|
-
- `tests_from_junit
|
26
|
-
- `tests_from_xctestrun
|
27
|
-
- `collate_junit_reports
|
18
|
+
- [`multi_scan`](#multi-scan): gives you control over how your tests are exercised.
|
19
|
+
- [`suppress_tests_from_junit`](#suppress_tests_from_junit): from a test report, suppresses tests in your project.
|
20
|
+
- [`suppress_tests`](#suppress_tests): from a provided list, suppresses tests in your project.
|
21
|
+
- [`suppressed_tests`](#suppressed_tests): returns a list of the suppressed tests in your project.
|
22
|
+
- [`tests_from_junit`](#tests_from_junit): from a test report, returns lists of passing and failed tests.
|
23
|
+
- [`tests_from_xctestrun`](#tests_from_xctestrun): from an xctestrun file, returns a list of tests for each of its test targets.
|
24
|
+
- [`collate_junit_reports`](#collate_junit_reports): combines multiple test reports into one.
|
25
|
+
|
26
|
+
### multi-scan 🎉
|
27
|
+
|
28
|
+
Is the fragile test infrastructure provided by `xcodebuild` failing tests inexplicably and getting you down 😢? Use the `:try_count` option to re-run those failed tests multiple times to ensure that any fragility is ironed out and only truly failing tests appear.
|
29
|
+
|
30
|
+
Is the sheer number of UI tests overloading the iOS Simulator and causing it to become useless? Run your tests in batches using the `:batch_count` option in order to lighten the load on the simulator.
|
31
|
+
|
32
|
+
Do you get frustrated when your automated test system keeps running after the fragile test infrastructure stops working halfway through your tests 😡? Use the `:testrun_completed_block` callback to bailout early or make adjustments on how your tests are exercised.
|
33
|
+
|
34
|
+
Do you have multiple test targets and the normal operation of `scan` is providing you a test report that implies that all the tests ran in one test target? Don't worry, `multi_scan` has fixed that.
|
35
|
+
|
36
|
+
### suppress_tests_from_junit
|
37
|
+
|
38
|
+
No time to fix a failing test? Suppress the `:failed` tests in your project and create and prioritize a ticket in your bug tracking system.
|
39
|
+
|
40
|
+
Want to create a special CI job that only re-tries failing tests? Suppress the `:passing` tests in your project and exercise your fragile tests.
|
41
|
+
|
42
|
+
### suppress_tests
|
43
|
+
|
44
|
+
Have some tests that you want turned off? Give the list to this action in order to suppress them for your project.
|
45
|
+
|
46
|
+
### suppressed_tests
|
47
|
+
|
48
|
+
Do you have an automated process that requires the list of suppressed tests in your project? Use this action to get that.
|
49
|
+
|
50
|
+
### tests_from_junit
|
51
|
+
|
52
|
+
Performing analysis on a test report file? Get the lists of failing and passing tests using this action.
|
53
|
+
|
54
|
+
### tests_from_xctestrun
|
55
|
+
|
56
|
+
Do you have multiple test targets referenced by your `xctestrun` file and need to know all the tests? Use this action to go through each test target, collect the tests, and return them to you in a simple and usable structure.
|
57
|
+
|
58
|
+
### collate_junit_reports
|
59
|
+
|
60
|
+
Do you have multiple test reports coming in from different sources and need it combined? Use this action to collate all the tests performed for a given test target into one report file.
|
28
61
|
|
29
62
|
## Example
|
30
63
|
|
@@ -62,9 +62,15 @@ module Fastlane
|
|
62
62
|
end
|
63
63
|
|
64
64
|
def self.build_for_testing(scan_options)
|
65
|
+
options_to_remove = %i[
|
66
|
+
try_count
|
67
|
+
batch_count
|
68
|
+
testrun_completed_block
|
69
|
+
test_without_building
|
70
|
+
]
|
65
71
|
config = FastlaneCore::Configuration.create(
|
66
72
|
Fastlane::Actions::ScanAction.available_options,
|
67
|
-
scan_options.merge(build_for_testing: true).reject { |k, _|
|
73
|
+
scan_options.merge(build_for_testing: true).reject { |k, _| options_to_remove.include?(k) }
|
68
74
|
)
|
69
75
|
Fastlane::Actions::ScanAction.run(config)
|
70
76
|
|
@@ -162,15 +168,15 @@ module Fastlane
|
|
162
168
|
try_count: 3,
|
163
169
|
batch_count: 8, # splits the tests into 8 chunks to not overload the iOS Simulator
|
164
170
|
testrun_completed_block: lambda { |testrun_info|
|
165
|
-
|
166
|
-
|
171
|
+
failed_test_count = testrun_info[:failed].size
|
172
|
+
passed_test_count = testrun_info[:passing].size
|
167
173
|
try_attempt = testrun_info[:try_count]
|
168
174
|
batch = testrun_info[:batch]
|
169
175
|
|
170
|
-
if failed_test_count > passed_test_count / 2
|
176
|
+
if passed_test_count > 0 && failed_test_count > passed_test_count / 2
|
171
177
|
UI.abort_with_message!("Too many tests are failing")
|
172
178
|
end
|
173
|
-
UI.message("😊 everything is fine, let\'s continue try #{try_attempt} for batch #{batch}")
|
179
|
+
UI.message("😊 everything is fine, let\'s continue try #{try_attempt + 1} for batch #{batch}")
|
174
180
|
}
|
175
181
|
)'
|
176
182
|
]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-test_center
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lyndsey Ferguson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-02-
|
11
|
+
date: 2018-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: plist
|