cukerail 0.3.5 → 0.3.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7ca72a855beaf0eb171de4e43366674b7f75c5ad
4
- data.tar.gz: 668ef187633fa78bd9d8b60dcad7faaa172def22
3
+ metadata.gz: b61eaa95b338d5f36a6daa1733e91836ac11a6ce
4
+ data.tar.gz: c2d39900caa9c5d6dd48a2b58b97ac01291db635
5
5
  SHA512:
6
- metadata.gz: 4765e49ccbb33919ddec291081222f2692c193573e9473f2a72c6438264d399b74d0c30229f70cca29cf0b5cc8d79b23c187eb003ebaa0a72f83646313895141
7
- data.tar.gz: fcabc83b418036dd731736aca67d65cb9146a3fd4c7ccdbdcdc5b7cadc13daf8ef2d28f11822098b16ac67485f80f320a88d08f95c97c87e45be6d4a19364091
6
+ metadata.gz: 2a8cf94b5d26444a974d436d2446ab17bfc1b2828739530985b1cf6626e0cb33a3d36aa61fdf0f525b1cda01f6e66bba5ad3662edac97f4f2abf9b63dd09a7c2
7
+ data.tar.gz: 53eb35f994bb4a7f6e9f36c367ff80fd0ecfa65324cbaba0a934e9ea3009e228c224c43374e7ff5cc03a37efddb9dc08bb006792591406484ff6c7b72cbaefb4
@@ -1,3 +1,3 @@
1
1
  module Cukerail
2
- VERSION = "0.3.5"
2
+ VERSION = "0.3.6"
3
3
  end
data/lib/json_sender.rb CHANGED
@@ -106,12 +106,18 @@ module Cukerail
106
106
  failure_message = nil
107
107
  end
108
108
  report_on_result = {status_id:testrail_status[:id],comment:failure_message,defects:defects(scenario)}
109
+ tries = 3
109
110
  begin
110
111
  testrail_api_client.send_post("add_result_for_case/#{run_id}/#{id}",report_on_result)
111
112
  rescue => e
112
113
  if e.message =~ /No \(active\) test found for the run\/case combination/
114
+ tries -= 1
113
115
  add_case_to_test_run(id,run_id)
114
- retry
116
+ if tries > 0
117
+ retry
118
+ else
119
+ puts "#{e.message} testrun=#{run_id} test case id=#{id}"
120
+ end
115
121
  else
116
122
  puts "#{e.message} testrun=#{run_id} test case id=#{id}"
117
123
  end
@@ -157,6 +163,7 @@ module Cukerail
157
163
  def add_case_to_test_run(testcase_id,run_id)
158
164
  run = get_run(run_id)
159
165
  unless run['include_all']
166
+ puts "add testcase #{testcase_id} to run #{run_id}"
160
167
  case_ids = get_tests_in_a_run(run_id).map{|h| h['case_id']} + [testcase_id]
161
168
  update_run(run_id,{'case_ids'=>case_ids})
162
169
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cukerail
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Small
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-03 00:00:00.000000000 Z
11
+ date: 2016-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler