ruby-testrail 1.2.0 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/testrail/cucumber_adaptor.rb +26 -16
- data/ruby-testrail.gemspec +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Njc1MTYzZmViY2Q1NmEzMWZjMDJjNzFjNzc3MDNiOTIzODMxNDAzMw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NTc3MjU2MzU4ZmI1YmU0MjQxZDY4OGE3NzYwMWVlYmM3OTAyNzI5Mg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YjgxYWVjN2VlNmIzZWZmNDljNWE4OGVkOTQ1YWM0NjlhYTljYWVlYmJjNTZj
|
10
|
+
ODk4NDEzOWI3ZTZjYWZlMjY5NzIyOGM0MDlkZTM0ZDBmZWFmNDg4MjkxODMz
|
11
|
+
M2FlYmRjMjAzN2UyOTBkZWI5ZDE1MDFiMTY0Y2E1MjhkY2E2MjI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YjkyZjRkYjljNjBlM2U4MWZhMTdlZTc0YjhiZjc5NDhlZjM5YzM3NjNiYWFl
|
14
|
+
NmQ4ZjRjYTY2ZDIyZGVmMDI1NzdiODgyZjI2N2ExYWU0Zjc0YWJhMDJlM2Jm
|
15
|
+
YzVlZjg4M2VmZWQ2M2M0NWI2NmI3MTI5NDZlNWQ1MjU0NDk4NjY=
|
@@ -19,29 +19,39 @@ module TestRail
|
|
19
19
|
|
20
20
|
# Submits an scenario test results
|
21
21
|
# If the test case exists, it will reuse the id, otherwise it will create a new Test Case in TestRails
|
22
|
-
# @param scenario [Cucumber
|
23
|
-
# A test case scenario after execution
|
22
|
+
# @param scenario [Cucumber Scenario|Cucumber Scenario Outline] A test case scenario after execution
|
24
23
|
def submit(scenario)
|
25
24
|
return unless @enabled
|
26
25
|
case scenario.class.name
|
27
26
|
when 'Cucumber::RunningTestCase::ScenarioOutlineExample'
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
test_comment = scenario.exception
|
27
|
+
test_results = resolve_from_scenario_outline(scenario)
|
28
|
+
when 'Cucumber::Ast::ScenarioOutline'
|
29
|
+
test_results = resolve_from_scenario_outline(scenario)
|
32
30
|
when 'Cucumber::RunningTestCase::Scenario'
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
test_comment = scenario.exception
|
31
|
+
test_results = resolve_from_simple_scenario(scenario)
|
32
|
+
when 'Cucumber::Ast::Scenario'
|
33
|
+
test_results = resolve_from_simple_scenario(scenario)
|
37
34
|
end
|
38
35
|
|
39
|
-
submit_test_result(
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
36
|
+
submit_test_result(test_results)
|
37
|
+
end
|
38
|
+
|
39
|
+
def resolve_from_scenario_outline(scenario)
|
40
|
+
{
|
41
|
+
section_name: scenario.scenario_outline.feature.name.strip,
|
42
|
+
test_name: scenario.scenario_outline.name.strip,
|
43
|
+
success: !scenario.failed?,
|
44
|
+
comment: scenario.exception
|
45
|
+
}
|
46
|
+
end
|
47
|
+
|
48
|
+
def resolve_from_simple_scenario(scenario)
|
49
|
+
{
|
50
|
+
section_name: scenario.feature.name.strip,
|
51
|
+
test_name: scenario.name.strip,
|
52
|
+
success: !scenario.failed?,
|
53
|
+
comment: scenario.exception
|
54
|
+
}
|
45
55
|
end
|
46
56
|
|
47
57
|
end
|
data/ruby-testrail.gemspec
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = 'ruby-testrail'
|
3
|
-
spec.version = '1.2.
|
3
|
+
spec.version = '1.2.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'
|
7
7
|
spec.authors = ['Javier Durante', 'Will Gauvin', 'Nathan Jones']
|
8
8
|
spec.email = 'mercury@findly.com'
|
9
9
|
spec.license = 'Apache-2.0'
|
10
|
-
spec.files = `git ls-files`.split("\n").reject {|path| path =~ /\.gitignore$/ }
|
10
|
+
spec.files = `git ls-files`.split("\n").reject { |path| path =~ /\.gitignore$/ }
|
11
11
|
spec.homepage = 'https://github.com/Findly-Inc/ruby-testrail'
|
12
12
|
spec.add_development_dependency 'rspec', '>= 3.0'
|
13
13
|
spec.add_development_dependency 'pry'
|