fastlane-plugin-test_center 3.5.0 → 3.5.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: 2c6a17f7ee4ae4381b5cff509b6ea0d2a7e860b8
4
- data.tar.gz: 79aac0aa87a128f9ab42841a1c5b8b87db1165b8
3
+ metadata.gz: 1eaa0f4225d01562a8fe0726ac8b542597e25a2f
4
+ data.tar.gz: da812fdf4b4d3c199537361331ce2ba325b864c4
5
5
  SHA512:
6
- metadata.gz: 602af20f6d4659244c748df0907077e87b432756d1f3c8cf55873f29b8c47432d5f62a4ad6e07227a54313a959e97b2662a3cb6308c35ecc1f38f0764d7eea62
7
- data.tar.gz: '096cb269e5fad71c010807212a466dc6067fa6dc86f63c9ba1484c6200d71d8af5a2bdf3965f6dd95c6155119b6d069bbd5294d6f067d781faa65e4bc5c170c9'
6
+ metadata.gz: e628ee3ea5f790c0f94e08d28e6b6103f7263955f806a054de77a6a359f93f2c4dce38297ffc694daf3096f08bb49e211e226545fceaa0224da0ff3a4728c775
7
+ data.tar.gz: 851ccddfcdc15fbf01de62956c1243102068b773d7b74832f845ea490a6511c8a4885b37d5171b913c8e48bc9cd6193d240a64a12e9feb0025a38706a4e2cd32
data/README.md CHANGED
@@ -1,8 +1,24 @@
1
- # test_center plugin đŸŽ¯
2
1
 
2
+ <!--
3
+ <img src="docs/test_center_banner.png" />
4
+ -->
5
+
6
+ # test_center plugin đŸŽ¯
3
7
  [![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-test_center)
4
8
 
5
- ## Getting Started
9
+ Have you ever spent too much time trying to fix fragile tests only to give up with nothing real to show? Use the `fastlane` actions from `test_center` to remove internal and external interference from your tests, so that you can focus on what makes 💰: features that customers love 😍.
10
+
11
+ <p align="center">
12
+ <a href="#quick-start">Quick Start</a> |
13
+ <a href="#overview">Overview</a> |
14
+ <a href="#issues-and-feedback">Issues and Feedback</a> |
15
+ <a href="#contributing">Contributing</a> |
16
+ <a href="#license">License</a>
17
+ </p>
18
+
19
+ <img src="docs/multi_scan.gif" />
20
+
21
+ ## Quick Start
6
22
 
7
23
  This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To get started with `fastlane-plugin-test_center`, add it to your project by running:
8
24
 
@@ -10,53 +26,51 @@ This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To
10
26
  fastlane add_plugin test_center
11
27
  ```
12
28
 
13
- ## About test_center
14
-
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.
29
+ Add this example 'lane' to your `Fastfile`, change `MY_XCODE_PROJECT_FILEPATH` to point to your project path, and change the option `scheme: AtomicBoy` in the call to `multi_scan` to be the name of your Xcode projects Scheme:
16
30
 
17
- The `test_center` plugin started with a problem when working on automated iOS tests:
31
+ ```ruby
18
32
 
33
+ ################################################################################
34
+ # An example of how one can use the plugin's :multi_scan action to run tests
35
+ # that have not yet passed (up to 3 times). If, after the 3 runs of the tests, there
36
+ # are still failing tests, print out the number of tests that are still failing.
37
+ #
38
+ # For a walkthrough to write a lane that can run tests up to 3 times, suppress
39
+ # the failing tests in the Xcode project, and create a Github Pull Request, see:
40
+ # https://github.com/lyndsey-ferguson/fastlane-plugin-test_center/blob/master/docs/WALKTHROUGH.md
41
+ ################################################################################
42
+
43
+ MY_XCODE_PROJECT_FILEPATH = File.absolute_path('../AtomicBoy/AtomicBoy.xcodeproj')
44
+ lane :sweep do
45
+ test_run_block = lambda do |testrun_info|
46
+ failed_test_count = testrun_info[:failed].size
47
+
48
+ if testrun_info[:failed_testcount] > 0
49
+ UI.important('The run of tests would finish with failures due to fragile tests here.')
50
+
51
+ try_attempt = testrun_info[:try_count]
52
+ if try_attempt < 3
53
+ UI.header('Since we are using :multi_scan, we can re-run just those failing tests!')
54
+ end
55
+ end
56
+ end
57
+
58
+ result = multi_scan(
59
+ project: MY_XCODE_PROJECT_FILEPATH,
60
+ try_count: 3,
61
+ fail_build: false,
62
+ scheme: 'AtomicBoy',
63
+ testrun_completed_block: test_run_block
64
+ )
65
+ unless result[:failed_testcount].zero?
66
+ UI.info("There are #{failed_tests.size} legitimate failing tests")
67
+ end
68
+ end
19
69
  ```
20
- 😘 - code is done, time to run the automated tests
21
-
22
- ✅✅✅✅✅❌❌✅❌✅✅❌❌✅✅✅✅✅❌✅✅✅✅✅✅✅✅❌✅✅✅✅❌❌✅✅❌❌❌✅✅✅✅✅✅❌✅✅
23
-
24
- 🤓 - most of these tests run fine locally and I do not know how to fix them...
25
-
26
- 😕 - bummer, maybe if I re-run the tests?
27
-
28
- ✅✅✅✅✅❌✅✅✅❌✅❌✅✅✅❌✅✅✅❌❌✅✅✅✅✅✅✅✅❌❌✅✅❌✅✅✅❌✅✅✅✅❌✅✅✅✅✅
29
-
30
- ☚ī¸ - aw man, still failing? One more time? 🤞
31
-
32
- ✅✅✅✅❌❌✅✅✅✅✅✅✅✅✅✅✅❌✅✅❌✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅❌✅✅✅✅✅✅❌✅✅✅
33
-
34
- 😡 - this is terrible, my tests keep failing randomly!
35
-
36
- 🤔 - maybe there is a better way?
37
-
38
- 🕐 🕡 🕚
39
-
40
- > enter multi_scan
41
70
 
42
- 😘 - code is done, time to run the automated tests
71
+ ## Overview
43
72
 
44
- ✅✅✅✅✅❌✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅❌✅✅✅✅✅✅✅✅✅✅
45
-
46
- 😕 - bummer, maybe if I re-run multi_scan again?
47
-
48
- ✅✅✅✅✅❌✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅❌✅✅✅✅✅✅✅✅✅✅
49
-
50
- 😕 - hmmm, maybe these are real test failures?
51
-
52
- ✅✅✅✅✅❌✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅❌✅✅✅✅✅✅✅✅✅✅
53
-
54
- 😛 - okay, these are real test failures, time to fix them!
55
-
56
- ✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅
57
-
58
- 😍 - green is joy!
59
- ```
73
+ This plugin makes testing your iOS app easier by providing you actions that give you greater control over everthing related to testing your app.
60
74
 
61
75
  `multi_scan` began when I engineered an action to only re-run the failed tests in order to determine which ones were truly failing, or just failing randomly due to a fragile infrastructure. This action morphed into an entire plugin with many actions related to tests.
62
76
 
@@ -74,16 +88,28 @@ This fastlane plugin includes the following actions:
74
88
 
75
89
  ### multi_scan 🎉
76
90
 
77
- 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.
91
+ Use `:multi_scan` intead of `:scan` to improve the usefulness of iOS test results, inspect partial results periodically during a test run, and provide better results reporting.
92
+
93
+ #### Improving Usefulness
78
94
 
79
- 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.
95
+ Over time, your tests can change the state of your application in unexpected ways that cause other tests to fail randomly. Or, the tools and infrastructure for testing are the root causes of random test failures. The test results may not truly reflect how the product code is working.
80
96
 
81
- 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.
97
+ Rather than wasting time trying to account for instable tools, or trying to tweak your test code ad-nauseum to get a passing result reliably, just use the `:try_count` option to run `:scan` multiple times, running only the tests that failed each time. This ensures that any _fragility_ is ironed out over a number of "tries". The end result is that only the truly failing tests appear.
82
98
 
83
- 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.
99
+ Another issue that can cause tests to incorrectly fail comes from an issue with the iOS Simulator. If you provide a huge number of tests to the iOS Simulator, it can exhaust the available resources and cause it to fail large numbers of tests. You can get around this by running your tests in batches using the `:batch_count` option in order to lighten the load on the simulator.
100
+
101
+ #### Inspect Partial Results
102
+
103
+ If you have a large number of tests, and you want to inspect the overall status of how test runs are progressing, you can use the `:testrun_completed_block` callback to bailout early or make adjustments on how your tests are exercised.
104
+
105
+ #### Better Results Reporting
106
+
107
+ 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 just one test target? Don't worry, `:multi_scan` has fixed that. It will provide a separate test report for each test target. It can handle JUnit, HTML, JSON, and Apple's `test_result` bundles.
108
+
109
+ `test_result` bundles are particularly useful because they contain screenshots of the UI when a UI test fails so you can review what was actually there compared to what you expected.
84
110
 
85
111
  <details>
86
- <summary>Example Code:</summary>
112
+ <summary>Example Code (expand to view):</summary>
87
113
  <!-- multi_scan examples: begin -->
88
114
 
89
115
  ```ruby
@@ -242,12 +268,12 @@ multi_scan(
242
268
 
243
269
  ### suppress_tests_from_junit
244
270
 
245
- 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.
271
+ Do you not have time to fix a test and it can be tested manually? You can suppress the `:failed` tests in your project and create and prioritize a ticket in your bug tracking system.
246
272
 
247
- 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.
273
+ Do you 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.
248
274
 
249
275
  <details>
250
- <summary>Example Code:</summary>
276
+ <summary>Example Code (expand to view):</summary>
251
277
  <!-- suppress_tests_from_junit examples: begin -->
252
278
 
253
279
  ```ruby
@@ -292,7 +318,7 @@ UI.message(
292
318
  Have some tests that you want turned off? Give the list to this action in order to suppress them for your project.
293
319
 
294
320
  <details>
295
- <summary>Example Code:</summary>
321
+ <summary>Example Code (expand to view):</summary>
296
322
  <!-- suppress_tests examples: begin -->
297
323
 
298
324
  ```ruby
@@ -352,7 +378,7 @@ suppress_tests(
352
378
  Do you have an automated process that requires the list of suppressed tests in your project? Use this action to get that.
353
379
 
354
380
  <details>
355
- <summary>Example Code:</summary>
381
+ <summary>Example Code (expand to view):</summary>
356
382
  <!-- suppressed_tests examples: begin -->
357
383
 
358
384
  ```ruby
@@ -402,7 +428,7 @@ UI.message("tests: #{tests}")
402
428
  Performing analysis on a test report file? Get the lists of failing and passing tests using this action.
403
429
 
404
430
  <details>
405
- <summary>Example Code:</summary>
431
+ <summary>Example Code (expand to view):</summary>
406
432
  <!-- tests_from_junit examples: begin -->
407
433
 
408
434
  ```ruby
@@ -424,7 +450,7 @@ UI.message("Failed tests: #{result[:failed]}")
424
450
  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.
425
451
 
426
452
  <details>
427
- <summary>Example Code:</summary>
453
+ <summary>Example Code (expand to view):</summary>
428
454
  <!-- tests_from_xctestrun examples: begin -->
429
455
 
430
456
  ```ruby
@@ -460,7 +486,7 @@ tests.values.flatten.each { |test_identifier| puts test_identifier }
460
486
  Do you have multiple junit 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.
461
487
 
462
488
  <details>
463
- <summary>Example Code:</summary>
489
+ <summary>Example Code (expand to view):</summary>
464
490
  <!-- collate_junit_reports examples: begin -->
465
491
 
466
492
  ```ruby
@@ -484,7 +510,7 @@ collate_junit_reports(
484
510
  Do you have multiple html 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.
485
511
 
486
512
  <details>
487
- <summary>Example Code:</summary>
513
+ <summary>Example Code (expand to view):</summary>
488
514
  <!-- collate_html_reports examples: begin -->
489
515
 
490
516
  ```ruby
@@ -508,7 +534,7 @@ collate_html_reports(
508
534
  Do you have multiple json 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.
509
535
 
510
536
  <details>
511
- <summary>Example Code:</summary>
537
+ <summary>Example Code (expand to view):</summary>
512
538
  <!-- collate_json_reports examples: begin -->
513
539
 
514
540
  ```ruby
@@ -532,7 +558,7 @@ collate_json_reports(
532
558
  Do you have multiple test_result bundles 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 test_result bundle.
533
559
 
534
560
  <details>
535
- <summary>Example Code:</summary>
561
+ <summary>Example Code (expand to view):</summary>
536
562
  <!-- collate_test_result_bundles examples: begin -->
537
563
 
538
564
  ```ruby
@@ -566,7 +592,11 @@ rubocop -a
566
592
 
567
593
  ## Issues and Feedback
568
594
 
569
- For any other issues and feedback about this plugin, please submit it to this repository.
595
+ For any other issues and feedback about this plugin, please [submit it](https://github.com/lyndsey-ferguson/fastlane-plugin-test_center/issues) to this repository.
596
+
597
+ ## Contributing
598
+
599
+ If you would like to contribute to this plugin, please review the [contributing document][contributing doc].
570
600
 
571
601
  ## Troubleshooting
572
602
 
@@ -579,3 +609,10 @@ For more information about how the `fastlane` plugin system works, check out the
579
609
  ## About _fastlane_
580
610
 
581
611
  _fastlane_ is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out [fastlane.tools](https://fastlane.tools).
612
+
613
+ ## License
614
+
615
+ MIT
616
+
617
+ <!-- Links -->
618
+ [contributing doc]: ./docs/CONTRIBUTING.md
@@ -223,6 +223,10 @@ module Fastlane
223
223
  def self.is_supported?(platform)
224
224
  platform == :ios
225
225
  end
226
+
227
+ def self.category
228
+ :testing
229
+ end
226
230
  end
227
231
  end
228
232
  end
@@ -163,6 +163,10 @@ module Fastlane
163
163
  def self.is_supported?(platform)
164
164
  platform == :ios
165
165
  end
166
+
167
+ def self.category
168
+ :testing
169
+ end
166
170
  end
167
171
  end
168
172
  end
@@ -143,6 +143,10 @@ module Fastlane
143
143
  ["lyndsey-ferguson/@lyndseydf"]
144
144
  end
145
145
 
146
+ def self.category
147
+ :testing
148
+ end
149
+
146
150
  def self.is_supported?(platform)
147
151
  platform == :ios
148
152
  end
@@ -172,6 +172,10 @@ module Fastlane
172
172
  ["lyndsey-ferguson/@lyndseydf"]
173
173
  end
174
174
 
175
+ def self.category
176
+ :testing
177
+ end
178
+
175
179
  def self.is_supported?(platform)
176
180
  platform == :ios
177
181
  end
@@ -310,6 +310,10 @@ module Fastlane
310
310
  ["lyndsey-ferguson/@lyndseydf"]
311
311
  end
312
312
 
313
+ def self.category
314
+ :testing
315
+ end
316
+
313
317
  def self.is_supported?(platform)
314
318
  platform == :ios
315
319
  end
@@ -164,6 +164,10 @@ module Fastlane
164
164
  ["lyndsey-ferguson/@lyndseydf"]
165
165
  end
166
166
 
167
+ def self.category
168
+ :testing
169
+ end
170
+
167
171
  def self.is_supported?(platform)
168
172
  platform == :ios
169
173
  end
@@ -128,6 +128,10 @@ module Fastlane
128
128
  ["lyndsey-ferguson/@lyndseydf"]
129
129
  end
130
130
 
131
+ def self.category
132
+ :testing
133
+ end
134
+
131
135
  def self.is_supported?(platform)
132
136
  platform == :ios
133
137
  end
@@ -132,6 +132,10 @@ module Fastlane
132
132
  ["lyndsey-ferguson/@lyndseydf"]
133
133
  end
134
134
 
135
+ def self.category
136
+ :testing
137
+ end
138
+
135
139
  def self.is_supported?(platform)
136
140
  platform == :ios
137
141
  end
@@ -75,6 +75,10 @@ module Fastlane
75
75
  ["lyndsey-ferguson/lyndseydf"]
76
76
  end
77
77
 
78
+ def self.category
79
+ :testing
80
+ end
81
+
78
82
  def self.is_supported?(platform)
79
83
  platform == :ios
80
84
  end
@@ -85,6 +85,10 @@ module Fastlane
85
85
  ["lyndsey-ferguson/lyndseydf"]
86
86
  end
87
87
 
88
+ def self.category
89
+ :testing
90
+ end
91
+
88
92
  def self.is_supported?(platform)
89
93
  platform == :ios
90
94
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module TestCenter
3
- VERSION = "3.5.0"
3
+ VERSION = "3.5.1"
4
4
  end
5
5
  end
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.5.0
4
+ version: 3.5.1
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-07-13 00:00:00.000000000 Z
11
+ date: 2018-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json