ruby-testrail 1.2.2 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NzE1MmJmMjg4ZTFhZWFmNDU3MTFjZmUzMTUyMDNhOTM5YmY0MGI5ZA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MGE4NDZlMTczZmQyMzVmMjIxMTBjNjc0NDY3MjMxMjY1NzRmZTNiMg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MmY0NDkyMzRiNWE0YzA0YTViYjk5NDFiMGFkY2QwOWVjZjQ5MTg3ZjE1MzIw
|
10
|
+
ZWUyYzg2Mjc4MGY0NmI1MTdjNDgwZDFiOGUwZTFlOGMyMGM5YWZhMWQyZmQz
|
11
|
+
MWU2YjZjNjU5OTYwZDI2YTQwY2E1OGI5YjAwOWNlNTYyNDdlYTQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MTJlYWIyZmJhNDUzMzAyZmE2ODNhMDVlNDczYTI1M2M2NGE2N2JiYjRjYmU5
|
14
|
+
ZDAzOWJjYWU2YjM3YWVlMTY1NzM2OWRkN2MwODVlMGEwMGRjZWYwYmNjMjQy
|
15
|
+
MmVlNzM3NGRkZTM5ZTEyN2ViNjc4ODJlZWE3YjVlZDgxM2U3YzY=
|
@@ -39,14 +39,17 @@ def create_test_result(type, test_case_result: true)
|
|
39
39
|
@test_case_section = 'test_case_section'
|
40
40
|
@test_case_name = 'test_case_name'
|
41
41
|
@test_case_comment = 'test_case_comment'
|
42
|
+
@example_name = nil
|
42
43
|
|
43
44
|
case type
|
44
45
|
when 'Cucumber Scenario Outline'
|
45
46
|
class_name = 'Cucumber::RunningTestCase::ScenarioOutlineExample'
|
46
47
|
scenario_outline = double('scenario_outline')
|
47
48
|
feature = double('feature')
|
49
|
+
@example_name = 'example_name'
|
48
50
|
|
49
51
|
allow(test_result).to receive(:scenario_outline) { scenario_outline }
|
52
|
+
allow(test_result).to receive(:name) { @example_name }
|
50
53
|
allow(test_result).to receive(:failed?) { !test_case_result }
|
51
54
|
allow(test_result).to receive(:exception) { @test_case_comment }
|
52
55
|
allow(scenario_outline).to receive(:feature) { feature }
|
@@ -143,9 +146,10 @@ end
|
|
143
146
|
|
144
147
|
Then(/^the submitted results contains the provided details/) do
|
145
148
|
expect(@test_run).to have_received(:submit_results)
|
149
|
+
|
146
150
|
expect(@test_run).to have_received(:add_test_result).with({
|
147
151
|
section_name: @test_case_section,
|
148
|
-
test_name: @test_case_name,
|
152
|
+
test_name: @example_name.nil? ? @test_case_name : "#{@test_case_name} #{@example_name}",
|
149
153
|
success: true,
|
150
154
|
comment: @test_case_comment
|
151
155
|
})
|
@@ -25,21 +25,20 @@ module TestRail
|
|
25
25
|
case scenario.class.name
|
26
26
|
when 'Cucumber::RunningTestCase::ScenarioOutlineExample'
|
27
27
|
test_results = resolve_from_scenario_outline(scenario)
|
28
|
-
when 'Cucumber::Ast::
|
28
|
+
when 'Cucumber::Ast::OutlineTable::ExampleRow'
|
29
29
|
test_results = resolve_from_scenario_outline(scenario)
|
30
30
|
when 'Cucumber::RunningTestCase::Scenario'
|
31
31
|
test_results = resolve_from_simple_scenario(scenario)
|
32
32
|
when 'Cucumber::Ast::Scenario'
|
33
33
|
test_results = resolve_from_simple_scenario(scenario)
|
34
34
|
end
|
35
|
-
|
36
35
|
submit_test_result(test_results)
|
37
36
|
end
|
38
37
|
|
39
38
|
def resolve_from_scenario_outline(scenario)
|
40
39
|
{
|
41
40
|
section_name: scenario.scenario_outline.feature.name.strip,
|
42
|
-
test_name: scenario.scenario_outline.name.strip,
|
41
|
+
test_name: "#{scenario.scenario_outline.name.strip} #{scenario.name.strip}",
|
43
42
|
success: !scenario.failed?,
|
44
43
|
comment: scenario.exception
|
45
44
|
}
|
data/ruby-testrail.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = 'ruby-testrail'
|
3
|
-
spec.version = '1.
|
3
|
+
spec.version = '1.3.2'
|
4
4
|
spec.date = '2016-04-26'
|
5
5
|
spec.summary = 'Ruby TestRail integration with RSpec and Cucumber Test Suites'
|
6
6
|
spec.description = 'Library to integrate Test Suite with TestRail'
|