parallel_tests 2.12.0 → 2.13.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c5093d00208e78bd29823d73e12a7409588adbd
|
4
|
+
data.tar.gz: f937ad2c7a3036ceda12fd4d2e432c45c5209822
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61241e2a1133c15307e8b50ac845aa0655c2120a98356e4bd08e1e14fbfbbd5b7bde367e55e934ad538183f9daa3b83707613d933136805130a30612a7d76355
|
7
|
+
data.tar.gz: 1f7a44c636ade949d48cec7253186f3be7052cf9fdd711004060e445ed0b357d1263ddd010d5abae318f683ae46a5eab5900e6c6d7e00d8648c9786165ab47d2
|
@@ -11,33 +11,22 @@ module ParallelTests
|
|
11
11
|
@tag_expression = tag_expression
|
12
12
|
end
|
13
13
|
|
14
|
-
def visit_feature_element(uri, feature_element)
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
#
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
# end
|
31
|
-
# rows.each_with_index { |row, index|
|
32
|
-
# next if index == 0 # slices didn't work with jruby data structure
|
33
|
-
# line = if row.respond_to?(:line)
|
34
|
-
# row.line
|
35
|
-
# else
|
36
|
-
# row.instance_variable_get(:@line)
|
37
|
-
# end
|
38
|
-
# @scenarios << [feature_element.feature.file, line].join(":")
|
39
|
-
# }
|
40
|
-
# }
|
14
|
+
def visit_feature_element(uri, feature_element, feature_tags)
|
15
|
+
scenario_tags = feature_element[:tags].map {|tag| ::Cucumber::Core::Ast::Tag.new(tag[:location], tag[:name])}
|
16
|
+
scenario_tags = feature_tags + scenario_tags
|
17
|
+
if feature_element[:examples].nil? # :Scenario
|
18
|
+
# We don't accept the feature_element if the current tags are not valid
|
19
|
+
return unless @tag_expression.evaluate(scenario_tags)
|
20
|
+
@scenarios << [uri, feature_element[:location][:line]].join(":")
|
21
|
+
else # :ScenarioOutline
|
22
|
+
feature_element[:examples].each do |example|
|
23
|
+
example_tags = example[:tags].map {|tag| ::Cucumber::Core::Ast::Tag.new(tag[:location], tag[:name])}
|
24
|
+
example_tags = scenario_tags + example_tags
|
25
|
+
next unless @tag_expression.evaluate(example_tags)
|
26
|
+
rows = example[:tableBody].select { |body| body[:type] == :TableRow }
|
27
|
+
rows.each { |row| @scenarios << [uri, row[:location][:line]].join(':') }
|
28
|
+
end
|
29
|
+
end
|
41
30
|
end
|
42
31
|
|
43
32
|
def method_missing(*args)
|
@@ -42,16 +42,15 @@ module ParallelTests
|
|
42
42
|
begin
|
43
43
|
# We make an attempt to parse the gherkin document, this could be failed if the document is not well formated
|
44
44
|
result = parser.parse(scanner)
|
45
|
+
feature_tags = result[:feature][:tags].map { |tag| ::Cucumber::Core::Ast::Tag.new(tag[:location], tag[:name]) }
|
45
46
|
|
46
47
|
# We loop on each children of the feature
|
47
48
|
result[:feature][:children].each do |feature_element|
|
48
|
-
# If the type of the child is not a scenario, we continue, we are only interested by the name of the scenario here
|
49
|
-
|
50
|
-
next
|
51
|
-
end
|
49
|
+
# If the type of the child is not a scenario or scenario outline, we continue, we are only interested by the name of the scenario here
|
50
|
+
next unless /Scenario/.match(feature_element[:type])
|
52
51
|
|
53
52
|
# It's a scenario, we add it to the scenario_line_logger
|
54
|
-
scenario_line_logger.visit_feature_element(document.uri, feature_element)
|
53
|
+
scenario_line_logger.visit_feature_element(document.uri, feature_element, feature_tags)
|
55
54
|
end
|
56
55
|
|
57
56
|
rescue StandardError => e
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parallel_tests
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Grosser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parallel
|