fastlane-plugin-setup_fragile_tests_for_rescan 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eba6b0904378b1a15e1a1726a19e860fca167ae3
4
- data.tar.gz: db69396620ed00b3b79142fc74c119db37f974eb
3
+ metadata.gz: cf32e902750e803cb6e46ed092b528eb75c42058
4
+ data.tar.gz: c52d1bc7395edf3f7ff7eb0930c48f6a8a062dc2
5
5
  SHA512:
6
- metadata.gz: c4550856230aaef617bb13027106bd49373d3423ad796b3186a2e2fb9ac058a37892bac167075d5fbbc09eeb91f81ea57d6814fcb32d79dae134386b49cc1d69
7
- data.tar.gz: 8d10b2bc8d044f37051430edd4e9703a1ba21dbcd2cc426fcc3fc554376533a5e619c7412fb4fa34b667fa9286fd103ae07a5c1e6d6c9abded2dca11c6ec4d96
6
+ metadata.gz: 9c0a183b31a743101a54b1b9fb92b0cc36dcffb200a8c183c281703f8cbc38b5fa89e923b48def6b469674ac604978ba51610d60b7b6069f16897a7627a756de
7
+ data.tar.gz: 6c81061f2d44f2dd3b647e09fcd6b60952b24c0d4f167236179939c471636319589586356b76848a87dc0eda2de673fc2b9dea54208b4611fbdaa23eb22d7de0
data/README.md CHANGED
@@ -12,15 +12,15 @@ fastlane add_plugin setup_fragile_tests_for_rescan
12
12
 
13
13
  ## About setup_fragile_tests_for_rescan
14
14
 
15
- Suppress stabile tests so that 'scan' can run the fragile tests again
16
-
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.
15
+ Xcode UI tests are notoriously fragile. This plugin examines the junit
16
+ test report that is produced by the `scan` action to suppress all passing
17
+ tests in preparation to re-scan the tests that failed to determine if they
18
+ were really failing or only failing because of Xcode's unstable test framework.
18
19
 
19
20
  ## Example
20
21
 
21
22
  Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`.
22
23
 
23
- **Note to author:** Please set up a sample project to make it easy for users to explore what your plugin does. Provide everything that is necessary to try out the plugin in this project (including a sample Xcode/Android project if necessary)
24
24
 
25
25
  ## Run tests for this plugin
26
26
 
@@ -4,6 +4,7 @@ module Fastlane
4
4
  class SetupFragileTestsForRescanAction < Action
5
5
  require 'nokogiri'
6
6
  require 'xcodeproj'
7
+ require 'terminal-table'
7
8
 
8
9
  def self.run(params)
9
10
  report_file = File.open(params[:report_filepath]) { |f| Nokogiri::XML(f) }
@@ -18,7 +19,8 @@ module Fastlane
18
19
  end
19
20
 
20
21
  scheme = xcscheme(params)
21
-
22
+ is_dirty = false
23
+ summary = []
22
24
  report_file.xpath('//testsuites').each do |testsuite|
23
25
  buildable_name = testsuite['name'].to_s
24
26
 
@@ -29,9 +31,18 @@ module Fastlane
29
31
  skipped_test = Xcodeproj::XCScheme::TestAction::TestableReference::SkippedTest.new
30
32
  skipped_test.identifier = "#{testcase['classname']}/#{testcase['name']}"
31
33
  testable.add_skipped_test(skipped_test)
34
+ is_dirty = true
35
+ summary << [skipped_test.identifier]
32
36
  testcase.remove
33
37
  end
34
38
  end
39
+ if is_dirty
40
+ table = Terminal::Table.new(
41
+ title: 'setup_fragile_tests_for_rescan suppressed the following tests',
42
+ rows: summary
43
+ )
44
+ UI.success(table)
45
+ end
35
46
  scheme.save!
36
47
  end
37
48
 
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module SetupFragileTestsForRescan
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-setup_fragile_tests_for_rescan
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
  - Lyndsey Ferguson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-24 00:00:00.000000000 Z
11
+ date: 2016-12-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri