itriagetestrail 0.9.4 → 0.9.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/itriagetestrail/trcucumber30.rb +40 -0
- data/lib/itriagetestrail/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab97f6dba005dce7772bd75122cc840e3cc51771
|
4
|
+
data.tar.gz: 020ef19261dc3c9fdea8f79b3957c0464d647d91
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec2ffe47c0d56d7fa9a6399f9ec6587474db142ae9380ec07fff4b898ea0eb29425cb48c6607f616a889085c4cbef05fb2b8b7f83647c6fc12172a31536c6f5b
|
7
|
+
data.tar.gz: e761c547d600901725fe21001ba3c12178e3c9fc0a58d485dc50fc1d62e0a5fafb47b85cecedfec382dfadfd96675f3aeb884cda0d07b28e78417f3121aa2523
|
@@ -0,0 +1,40 @@
|
|
1
|
+
require 'itriagetestrail'
|
2
|
+
module Itriagetestrail
|
3
|
+
class TRCucumber30 < TestRailInterface
|
4
|
+
|
5
|
+
def record_result(scenario)
|
6
|
+
return if execute == false
|
7
|
+
begin
|
8
|
+
if scenario.class.to_s == 'Cucumber::RunningTestCase::ScenarioOutlineExample'
|
9
|
+
scenario_cell_id = []
|
10
|
+
scenario.name.split('|')[1..50].each {|cell| scenario_cell_id << cell.gsub(/[\| "]/, "") }
|
11
|
+
@scenario_title = "#{scenario.scenario_outline.name}, Example: #{scenario_cell_id}"
|
12
|
+
@external_id = "#{scenario.feature.short_name};#{@scenario_title}"[0,249]
|
13
|
+
else
|
14
|
+
@external_id = "#{scenario.feature.short_name};#{scenario.name}"
|
15
|
+
@scenario_title = scenario.name
|
16
|
+
end
|
17
|
+
|
18
|
+
@scenario_steps = scenario.test_steps.select{'name'}.collect { |name| name.name }.join("\n")
|
19
|
+
|
20
|
+
if scenario.passed?
|
21
|
+
store_result(@scenario_title, @external_id, @scenario_steps, 1, '')
|
22
|
+
else
|
23
|
+
store_result(@scenario_title, @external_id, @scenario_steps,
|
24
|
+
"#{ENV['RERUN'] ? 5 : 4}".to_i, "#{scenario.exception.class}\n#{scenario.exception}\n#{scenario.exception.backtrace}")
|
25
|
+
end
|
26
|
+
send_results_to_testrail
|
27
|
+
rescue => exception
|
28
|
+
puts "TESTRAIL ENCOUNTERED AN ERROR: #{exception}\n #{@external_id} \n\n"
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def shutdown
|
33
|
+
if execute
|
34
|
+
sleep 3 # testrail service rate limit precaution
|
35
|
+
send_results_to_testrail
|
36
|
+
super
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: itriagetestrail
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- a801069
|
@@ -63,6 +63,7 @@ files:
|
|
63
63
|
- lib/itriagetestrail/testrail_binding.rb
|
64
64
|
- lib/itriagetestrail/trcucumber13.rb
|
65
65
|
- lib/itriagetestrail/trcucumber20.rb
|
66
|
+
- lib/itriagetestrail/trcucumber30.rb
|
66
67
|
- lib/itriagetestrail/trminitest.rb
|
67
68
|
- lib/itriagetestrail/version.rb
|
68
69
|
homepage:
|