parallel_tests 2.20.0 → 2.21.0

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: 126a6088de6cb41ed24578e9e0073cb397864193
4
- data.tar.gz: 82c3b988b3ebb7fa769bd2875636f835738010e5
3
+ metadata.gz: b21c43a2b0797b545335a094d846b070d300c576
4
+ data.tar.gz: 7ce394c192647e4aed53937d42494a8bfd2ae4b8
5
5
  SHA512:
6
- metadata.gz: 9a37bc96ddd7bf3609160abfc60b7a0617342ff17277f51c77ddd05e0dedac193f5c2830ac25900ac19cef1dc295faae633aca66e14935b90f2dee1533879ef4
7
- data.tar.gz: '0878caabc9da6424645a72bd7bbc141aa91bce6cced4b6adbe0a10ce6a0a5ded372b677166f851bb05bee69b4b63b797bde40ae79bede47028606ddbfbc1d756'
6
+ metadata.gz: cfe3cf7c94d8af96f075cb72b1cb100a85c4fc08e7f682c8e6f1b72f9dfd89e3090c8cd4507b14db72f81fad74ed8d3b9e903729a87c662d9b540898d64d61f7
7
+ data.tar.gz: 800d91f9284cbb94e0d16d7f93b9e21309818c1271c89eee80e934da80bc5eb32c12d5162710001085659555b2fb71e09519a07bb3ee87a3bea4f63953fd3380
@@ -3,7 +3,8 @@ require "parallel_tests/gherkin/runner"
3
3
  module ParallelTests
4
4
  module Cucumber
5
5
  class Runner < ParallelTests::Gherkin::Runner
6
- FAILED_SCENARIO_REGEX = /^cucumber features\/.+:\d+/
6
+ SCENARIOS_RESULTS_BOUNDARY_REGEX = /^(Failing|Flaky) Scenarios:$/
7
+ SCENARIO_REGEX = /^cucumber features\/.+:\d+/
7
8
 
8
9
  class << self
9
10
  def name
@@ -11,16 +12,18 @@ module ParallelTests
11
12
  end
12
13
 
13
14
  def line_is_result?(line)
14
- super || line =~ FAILED_SCENARIO_REGEX
15
+ super || line =~ SCENARIO_REGEX || line =~ SCENARIOS_RESULTS_BOUNDARY_REGEX
15
16
  end
16
17
 
17
18
  def summarize_results(results)
18
19
  output = []
19
20
 
20
- failing_scenarios = results.grep(FAILED_SCENARIO_REGEX)
21
- if failing_scenarios.any?
22
- failing_scenarios.unshift("Failing Scenarios:")
23
- output << failing_scenarios.join("\n")
21
+ scenario_groups = results.slice_before(SCENARIOS_RESULTS_BOUNDARY_REGEX).group_by(&:first)
22
+ scenario_groups.each do |header, group|
23
+ scenarios = group.flatten.grep(SCENARIO_REGEX)
24
+ if scenarios.any?
25
+ output << ([header] + scenarios).join("\n")
26
+ end
24
27
  end
25
28
 
26
29
  output << super
@@ -44,7 +44,7 @@ module ParallelTests
44
44
  # 1 scenario (1 failed)
45
45
  # 1 step (1 failed)
46
46
  def summarize_results(results)
47
- sort_order = %w[scenario step failed undefined skipped pending passed]
47
+ sort_order = %w[scenario step failed flaky undefined skipped pending passed]
48
48
 
49
49
  %w[scenario step].map do |group|
50
50
  group_results = results.grep(/^\d+ #{group}/)
@@ -1,3 +1,3 @@
1
1
  module ParallelTests
2
- VERSION = Version = '2.20.0'
2
+ VERSION = Version = '2.21.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parallel_tests
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.20.0
4
+ version: 2.21.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser