itriagetestrail 1.0.37 → 1.1.0
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: c0b3120de8c07f512b00f95ab2106b1528562ce6f36c0a4c0164aed195a3417b
|
4
|
+
data.tar.gz: ea62d6b621a13c83fb2ad4f770e33271d64465e4cb1e44a422c91bbb07b9cc14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50f426309649a2579291d69218a2c3f501f40319720204cc771534b7fc1c28f08fa07a002c5818cfe4d28ebaf4a82ae830a054ee447f7e4396fb972d49056ca5
|
7
|
+
data.tar.gz: 5c23beefd4b6f19492dd0482140eebc954477f8412521ae31e791923d4f8d7fc7fe361443e743a2b206e03b7b251d018b6ff2923bfbfcb3aad6f5259e11df9fa
|
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
|
|
@@ -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.1.0
|
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
|