itriagetestrail 0.6.0 → 0.6.1

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: 2d1960639f8e4cd82fe80fa734436b872d05c018
4
- data.tar.gz: 5a44dbc4079749184d255994518ff7480b6a5a4d
3
+ metadata.gz: 2aabce36859c1b506fd44864d10cbcbf1e9f0b32
4
+ data.tar.gz: a2b722abbdebc779f271a3f7ece1385d20df9c9e
5
5
  SHA512:
6
- metadata.gz: f63d93ddb17a1011daf9432fb86815ce4a99071734b5ad2a9e9caf2815fa098cc5e5d78236016074e93c2155e36951e43ad651f8a180671e4d0e47966e8036f0
7
- data.tar.gz: 93b8dd927d8b1cbc38089ab45fbc4b7550fb1fa51f91afde19c6147207e0fd154bc94099f3ca7b4acc12d3d21a9bf5ab37d7932d085b3520e82b049e3a7d1b63
6
+ metadata.gz: 1cbb9027cc46daac520e6759c3af2e285c2a1b5b2a13cc62042a264385131037e53f44f56c46bee543f6c70c36fd1b83aae306cd635cf899e51618253c315e0e
7
+ data.tar.gz: f37a7b429d2578ccfb2ce80f9d153457da3c648a9333bacb4440859196704a8c325acfc00e66f0d4311e1535e15ad70793b282cb69c5b42a012d08caee62fb01
@@ -21,7 +21,8 @@ module Itriagetestrail
21
21
  if scenario.passed?
22
22
  store_result(@scenario_title, @external_id, @scenario_steps, 1, '')
23
23
  else
24
- store_result(@scenario_title, @external_id, @scenario_steps, "#{ENV['RERUN'] ? 5 : 4}".to_i, "#{scenario.exception.class}\n#{scenario.exception}\n#{scenario.exception.backtrace}")
24
+ store_result(@scenario_title, @external_id, @scenario_steps,
25
+ "#{ENV['RERUN'] ? 5 : 4}".to_i, "#{scenario.exception.class}\n#{scenario.exception}\n#{scenario.exception.backtrace}")
25
26
  end
26
27
  update_test_run
27
28
  send_results_to_testrail
@@ -6,21 +6,22 @@ module Itriagetestrail
6
6
  return if execute == false
7
7
  begin
8
8
  if scenario.class.to_s == 'Cucumber::RunningTestCase::ScenarioOutlineExample'
9
- @external_id = "#{scenario.feature.short_name};#{scenario.name};#{scenario.cell_values}"[0,249]
9
+ scenario_cell_id = []
10
+ scenario.name.split('|')[1..50].each {|cell| scenario_cell_id << cell.gsub(/[\| "]/, "") }
11
+ @scenario_title = "#{scenario.scenario_outline.title}, Example: #{scenario_cell_id}"
12
+ @external_id = "#{scenario.feature.short_name};#{@scenario_title}"[0,249]
10
13
  else
11
14
  @external_id = "#{scenario.feature.short_name};#{scenario.name}"
15
+ @scenario_title = scenario.name
12
16
  end
13
- @scenario_title = scenario.name
14
17
 
15
- steps = []
16
-
17
- scenario.test_steps.select{'name'}.each { |name| steps << name.name unless name.name == 'Before hook' }
18
- @scenario_steps = steps.each { |step| step }.join('\n')
18
+ @scenario_steps = scenario.test_steps.select{'name'}.collect { |name| name.name }.join("\n")
19
19
 
20
20
  if scenario.passed?
21
21
  store_result(@scenario_title, @external_id, @scenario_steps, 1, '')
22
22
  else
23
- store_result(@scenario_title, @external_id, @scenario_steps, "#{ENV['RERUN'] ? 5 : 4}".to_i, "#{scenario.exception.class}\n#{scenario.exception}\n#{scenario.exception.backtrace}")
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}")
24
25
  end
25
26
  update_test_run
26
27
  send_results_to_testrail
@@ -1,3 +1,3 @@
1
1
  module Itriagetestrail
2
- VERSION = '0.6.0'
2
+ VERSION = '0.6.1'
3
3
  end
@@ -82,6 +82,7 @@ module Itriagetestrail
82
82
 
83
83
  def setup
84
84
  return false if setup?
85
+ return false unless execute
85
86
 
86
87
  @results = { results: [] }
87
88
  @submitted = { results: [] }
@@ -525,9 +526,10 @@ module Itriagetestrail
525
526
  @shared_run = true
526
527
  end
527
528
 
528
- def close_run
529
+ def close_run(message='')
529
530
  @client.send_post("update_run/#{@run_id}", {description: 'Timestamp: ' + @time_zone.now.strftime('%m/%d/%Y %I:%M %p') \
530
- + ("\nBranch: #{@testrail_config[:origin]}")})
531
+ + ("\nBranch: #{@testrail_config[:origin]}")} \
532
+ + "\n#{message}")
531
533
  @client.send_post("close_run/#{@run_id}", {})
532
534
  end
533
535
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itriagetestrail
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - a801069
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-11-14 00:00:00.000000000 Z
11
+ date: 2016-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler