itriagetestrail 1.0.36 → 1.0.41
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9e43873e3f892151838043b2e3bfd437c71d7a3ca09816611c6c5157a0963c1
|
4
|
+
data.tar.gz: e050287f8570d73159cbf8728e860d09021323fcc9c4925f86f1339e25dbdaa6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4a0b38fc7a6948b01dfd737d05233f14388dbb30ec2b5e492317e3804c94247ad6e0565d0cbc1ca00c1edc4fd836cab8975a19a3c20cae672b22f4b3bbe24e8
|
7
|
+
data.tar.gz: e2cd6c73d936727ce312f4c352b474caab60dae02cb8942762380a0b02bc7880c8e182e9f93f1a40718eaf4694cf0124c4f37784395543f5555ac03abe492caf
|
data/lib/itriagetestrail.rb
CHANGED
@@ -44,8 +44,8 @@ module TestRail
|
|
44
44
|
# uri The API method to call including parameters
|
45
45
|
# (e.g. get_case/1)
|
46
46
|
#
|
47
|
-
def send_get(uri)
|
48
|
-
res = read_cache(uri)
|
47
|
+
def send_get(uri, read_cache = true)
|
48
|
+
res = read_cache(uri) if read_cache
|
49
49
|
res || _send_request('GET', uri, nil, true)
|
50
50
|
end
|
51
51
|
|
@@ -162,7 +162,7 @@ module TestRail
|
|
162
162
|
file = File.open("./tmp/#{filename}", 'r')
|
163
163
|
content = JSON.parse(file.read)
|
164
164
|
file.close
|
165
|
-
content[
|
165
|
+
content['response']
|
166
166
|
end
|
167
167
|
|
168
168
|
def sanitize_filename(filename)
|
@@ -3,12 +3,12 @@
|
|
3
3
|
module Itriagetestrail
|
4
4
|
module TestCases
|
5
5
|
# TestRail Cases
|
6
|
-
def testrail_ids
|
6
|
+
def testrail_ids(read_cache = true)
|
7
7
|
case @suite_mode
|
8
8
|
when 2, 3
|
9
|
-
@test_cases = @client.send_get("get_cases/#{@project_id}&suite_id=#{@suite_id}&type_id=3")
|
9
|
+
@test_cases = @client.send_get("get_cases/#{@project_id}&suite_id=#{@suite_id}&type_id=3", read_cache)
|
10
10
|
else
|
11
|
-
@test_cases = @client.send_get("get_cases/#{@project_id}&type_id=3")
|
11
|
+
@test_cases = @client.send_get("get_cases/#{@project_id}&type_id=3", read_cache)
|
12
12
|
end
|
13
13
|
|
14
14
|
@test_case_ids = []
|
@@ -47,7 +47,7 @@ module Itriagetestrail
|
|
47
47
|
@client.send_post("add_case/#{section_id}", body)
|
48
48
|
|
49
49
|
# refresh test case ids
|
50
|
-
testrail_ids
|
50
|
+
testrail_ids(false)
|
51
51
|
end
|
52
52
|
|
53
53
|
def app_version_label
|
@@ -18,10 +18,10 @@ module Itriagetestrail
|
|
18
18
|
|
19
19
|
# In implementations where there is not an at_exit, parallel test threads can store results
|
20
20
|
# of tests from the completed test class into a batch file, so final processing sends all results
|
21
|
-
# at the very end of the job while avoiding rate limiting issues.
|
21
|
+
# at the very end of the job while avoiding rate limiting issues. Each row is a separate json.
|
22
22
|
def store_results_to_batch_file
|
23
23
|
return if @results[:results].empty?
|
24
|
-
entry = {runId: @run_id, results: @results[:results]}
|
24
|
+
entry = {runId: @run_id, results: @results[:results]}.to_json
|
25
25
|
|
26
26
|
Dir.mkdir('./tmp') unless File.exist?('./tmp')
|
27
27
|
file = File.open("./tmp/batch", 'a')
|
@@ -53,10 +53,11 @@ module Itriagetestrail
|
|
53
53
|
run_id = nil
|
54
54
|
results = []
|
55
55
|
File.open("./tmp/batch").each do |line|
|
56
|
-
content =
|
56
|
+
content = JSON.parse(line, symbolize_names: true)
|
57
57
|
unless run_id
|
58
58
|
run_id = content[:runId]
|
59
59
|
end
|
60
|
+
puts content
|
60
61
|
content[:results].each { |result| results << result }
|
61
62
|
end
|
62
63
|
{runId: run_id, results: results}
|
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: 1.0.
|
4
|
+
version: 1.0.41
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- a801069
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tzinfo
|