itriagetestrail 0.9.4 → 0.9.5

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: 70796d7df6c7d06b5d171013f5a799975e0de20a
4
- data.tar.gz: 4fbeb9e8b01f24e767dfda335d9799b2f3b6f31a
3
+ metadata.gz: ab97f6dba005dce7772bd75122cc840e3cc51771
4
+ data.tar.gz: 020ef19261dc3c9fdea8f79b3957c0464d647d91
5
5
  SHA512:
6
- metadata.gz: 30673f4e2b780cab4bcb9b00c74baf5dd7d45b2de394e5b460da8c835758dd702743a606b17563f408820addc97b7e126dd439da49b431b43df677439983f38f
7
- data.tar.gz: 2f1d6c7bcb33c70c4af008d9207428bcc31d988f3dbff6e4ca1e58935b89929a790867e9cd20bc007b0626f119d66bb5da7212d48ff3e48f799e94303147c268
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
@@ -1,3 +1,3 @@
1
1
  module Itriagetestrail
2
- VERSION = '0.9.4'
2
+ VERSION = '0.9.5'
3
3
  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
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: