itriagetestrail 0.3.6 → 0.3.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/itriagetestrail/version.rb +1 -1
- data/lib/itriagetestrail.rb +29 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 54047ca763dcc4840c06e0e6311c98ab8893be3e
|
4
|
+
data.tar.gz: 2ead1b1c1f17b53fb2a9cf339b205a04dbb8c526
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3210afa917b7c8e9815d0b496e41bece370138b04078fc2ee909d7bb18e5b84d348b2dbadd9a61e74a6bd6f9e2dec0cbd7901a4762a146ff4624c604c5bbe93
|
7
|
+
data.tar.gz: cd87e2e9b67fa081ae6f19863f8bb86959da39efd04520738798e402de3d39ba3bea86a985feb08a45ab1793538739426c532adf3ef7f4bb59a2ebfb69ff1a40
|
data/lib/itriagetestrail.rb
CHANGED
@@ -65,7 +65,11 @@ module Itriagetestrail
|
|
65
65
|
|
66
66
|
reset_milestone(@milestone_name)
|
67
67
|
|
68
|
-
|
68
|
+
if @run_id == 0
|
69
|
+
add_testrail_run
|
70
|
+
else
|
71
|
+
extend_testrail_run
|
72
|
+
end
|
69
73
|
|
70
74
|
@pool = Pool.new(1)
|
71
75
|
|
@@ -292,6 +296,19 @@ module Itriagetestrail
|
|
292
296
|
label + ' (' + @time_zone.now.strftime('%-I:%M %p') + ')'
|
293
297
|
end
|
294
298
|
|
299
|
+
def extend_testrail_run
|
300
|
+
# Get a list of test cases from prior runs
|
301
|
+
@existing_cases = File.read('./tmp/testrail_ids')
|
302
|
+
|
303
|
+
# Reset test scope to include all cases
|
304
|
+
body = { include_all: true }
|
305
|
+
@client.send_post("update_run/#{@run_id}", body)
|
306
|
+
end
|
307
|
+
|
308
|
+
def existing_cases
|
309
|
+
@existing_cases.split(',')
|
310
|
+
end
|
311
|
+
|
295
312
|
# open a test run to submit test results
|
296
313
|
def add_testrail_run
|
297
314
|
if @testrail_config[:include_all] || true
|
@@ -365,12 +382,23 @@ module Itriagetestrail
|
|
365
382
|
}
|
366
383
|
end
|
367
384
|
|
385
|
+
def store_case_ids(list)
|
386
|
+
File.open('./tmp/testrail_ids', 'a') { |file| file.print list }
|
387
|
+
end
|
388
|
+
|
368
389
|
# this is the hack at very end to exclude tests which frameworks like MiniTest and Cucumber did not touch
|
369
390
|
# including all tests at beginning is necessary so that at least some progress can be seen when
|
370
391
|
# real time updating is enabled.
|
371
392
|
def update_test_run
|
372
393
|
executed_ids = []
|
373
394
|
@results[:results].each {|id| executed_ids << id[:case_id]}
|
395
|
+
|
396
|
+
# Save ids for more processes in this run
|
397
|
+
store_case_ids(executed_ids)
|
398
|
+
|
399
|
+
# If previous ids exist, retain them and their results
|
400
|
+
existing_cases.each { |case_id| executed_ids << case_id }
|
401
|
+
|
374
402
|
send = {include_all: false, case_ids: executed_ids}
|
375
403
|
@client.send_post("update_run/#{@run_id}", send)
|
376
404
|
end
|
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.3.
|
4
|
+
version: 0.3.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- a801069
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|