itriagetestrail 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/itriagetestrail.rb +13 -13
- data/lib/itriagetestrail/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf4df2794d0c74d56c6077b9dd655da95ece76a6
|
4
|
+
data.tar.gz: 2636e573c9764ce08fadc27142d0987d4bfcb388
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f77119596ebb7b828fc7869dd45b092fc9a4aeb303b8c812043e91708d7738b60a000851f6464d21958c8d8fff7f9132d81649758dea996efd6ba9473439cca
|
7
|
+
data.tar.gz: 88bc9d82407c77a72ffb257bd91753efbbc502796d8d861f1b448eec06fc9ea4a952fb244d91f5af93991c93b571faef87092444c519ca4a290c83a981fb26cf
|
data/lib/itriagetestrail.rb
CHANGED
@@ -19,11 +19,11 @@ module Itriagetestrail
|
|
19
19
|
@run_id = 0
|
20
20
|
@setup = false
|
21
21
|
@testrail_config = testrail_config
|
22
|
-
@milestone_name = normalize_milestone(@testrail_config[
|
23
|
-
@jenkins_build = @testrail_config[
|
24
|
-
@app_version = @testrail_config[
|
22
|
+
@milestone_name = normalize_milestone(@testrail_config[:origin])
|
23
|
+
@jenkins_build = @testrail_config[:jenkinsBuild]
|
24
|
+
@app_version = @testrail_config[:appVersion]
|
25
25
|
|
26
|
-
if @testrail_config[
|
26
|
+
if @testrail_config[:user].nil? || @testrail_config[:user] == ''
|
27
27
|
@execute = false
|
28
28
|
else
|
29
29
|
@execute = true
|
@@ -41,7 +41,7 @@ module Itriagetestrail
|
|
41
41
|
@submitted = { results: [] }
|
42
42
|
|
43
43
|
@external_results = { results: [] }
|
44
|
-
@batch_size = @testrail_config[
|
44
|
+
@batch_size = @testrail_config[:batch_size] || 0
|
45
45
|
|
46
46
|
make_connection
|
47
47
|
|
@@ -64,9 +64,9 @@ module Itriagetestrail
|
|
64
64
|
end
|
65
65
|
|
66
66
|
def make_connection
|
67
|
-
@client = TestRail::APIClient.new(@testrail_config[
|
68
|
-
@client.user = @testrail_config[
|
69
|
-
@client.password = @testrail_config[
|
67
|
+
@client = TestRail::APIClient.new(@testrail_config[:site])
|
68
|
+
@client.user = @testrail_config[:user]
|
69
|
+
@client.password = @testrail_config[:password]
|
70
70
|
end
|
71
71
|
|
72
72
|
# TestRail Sections
|
@@ -94,17 +94,17 @@ module Itriagetestrail
|
|
94
94
|
end
|
95
95
|
|
96
96
|
def set_project_id()
|
97
|
-
requested_id = @testrail_config[
|
97
|
+
requested_id = @testrail_config[:projectId]
|
98
98
|
case requested_id
|
99
99
|
when nil, ''
|
100
100
|
# a project id was not provided, fetch it from TestRail by project name
|
101
101
|
projects = @client.send_get("get_projects")
|
102
102
|
res = -1
|
103
103
|
projects.each do |project|
|
104
|
-
res = project['id'] if project['name'] == @testrail_config[
|
104
|
+
res = project['id'] if project['name'] == @testrail_config[:projectName]
|
105
105
|
end
|
106
106
|
if res == -1
|
107
|
-
puts "TestRail Project Not found for #{@testrail_config[
|
107
|
+
puts "TestRail Project Not found for #{@testrail_config[:projectName]}"
|
108
108
|
@execute = false
|
109
109
|
return
|
110
110
|
end
|
@@ -205,7 +205,7 @@ module Itriagetestrail
|
|
205
205
|
|
206
206
|
# open a test run to submit test results
|
207
207
|
def add_testrail_run
|
208
|
-
if @testrail_config[
|
208
|
+
if @testrail_config[:include_all] || true
|
209
209
|
|
210
210
|
body = {
|
211
211
|
name: test_name,
|
@@ -276,7 +276,7 @@ module Itriagetestrail
|
|
276
276
|
|
277
277
|
def closerun?()
|
278
278
|
true
|
279
|
-
false if @testrail_config[
|
279
|
+
false if @testrail_config[:close_run] == 'false'
|
280
280
|
end
|
281
281
|
|
282
282
|
def shutdown
|