testrail-ruby 0.0.11 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/endpoints.rb +209 -23
- data/lib/testrail-ruby.rb +4 -4
- data/lib/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: ff8374e2b90c61534c04a2f27dd686a55ef7fa02
|
4
|
+
data.tar.gz: 604940f6e96ecb8bef9ceb2eb3f8eebe14669cc9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ed391b36407069c2556fc6aa8c31ca913aa73931c5201ceaca28434a43ad73951ab70c4cd09c8c855c15f9773d8a47c38083fa4fdbbc9432502e377d5719303
|
7
|
+
data.tar.gz: a264129d971f1a1318f060793f074339c7000701f64a90af4224617c86171ca2bb149e5ac8a67c896c5d74b6badf47c69f77a255275eb33725640f5de39d1197
|
data/lib/endpoints.rb
CHANGED
@@ -1,15 +1,17 @@
|
|
1
1
|
module Endpoints
|
2
|
-
#
|
2
|
+
# Returns an existing test case
|
3
3
|
# @param case_id [int] The id of the test case you want.
|
4
4
|
# @param opts [hash]
|
5
|
+
# @example GET index.php?/api/v2/get_case/:case_id
|
5
6
|
# @see http://docs.gurock.com/testrail-api2/reference-cases
|
6
7
|
def get_case(case_id, opts = {})
|
7
8
|
send_get("get_case/#{case_id.to_s}", opts)
|
8
9
|
end
|
9
10
|
|
10
|
-
#
|
11
|
+
# Returns a list of test cases for a test suite or specific section in a test suite.
|
11
12
|
# @param project_id [int] The id of the project that contains your tests
|
12
13
|
# @param opts [hash]
|
14
|
+
# @example GET index.php?/api/v2/get_cases/:project_id
|
13
15
|
# @see http://docs.gurock.com/testrail-api2/reference-cases
|
14
16
|
def get_cases(project_id, opts = {})
|
15
17
|
send_get("get_cases/#{project_id.to_s}", opts)
|
@@ -20,6 +22,7 @@ module Endpoints
|
|
20
22
|
# @param suite_id [int] The id of the suite within the project
|
21
23
|
# @param section_id [int] The id of the section within the suite
|
22
24
|
# @param opts [hash]
|
25
|
+
# @example GET index.php?/api/v2/get_cases/:project_id&suite_id=:suite_id§ion_id=:section_id
|
23
26
|
# @see http://docs.gurock.com/testrail-api2/reference-cases
|
24
27
|
def get_cases_by_section(project_id, suite_id, section_id, opts = {})
|
25
28
|
send_get("get_cases/#{project_id.to_s}&suite_id=#{suite_id.to_s}§ion_id=#{section_id.to_s}", opts)
|
@@ -29,22 +32,25 @@ module Endpoints
|
|
29
32
|
# @param project_id [int] The id of the project that contains your tests
|
30
33
|
# @param suite_id [int] The id of the suite within the project
|
31
34
|
# @param opts [hash]
|
35
|
+
# @example GET index.php?/api/v2/get_cases/:project_id&suite_id=:suite_id
|
32
36
|
# @see http://docs.gurock.com/testrail-api2/reference-cases
|
33
37
|
def get_cases_by_suite(project_id, suite_id, opts = {})
|
34
38
|
send_get("get_cases/#{project_id.to_s}&suite_id=#{suite_id.to_s}", opts)
|
35
39
|
end
|
36
40
|
|
37
|
-
#
|
38
|
-
# @param
|
41
|
+
# Creates a new test case
|
42
|
+
# @param section_id [int] The id of the test case
|
39
43
|
# @param opts [hash]
|
44
|
+
# @example POST index.php?/api/v2/add_case/:section_id
|
40
45
|
# @see http://docs.gurock.com/testrail-api2/reference-cases
|
41
|
-
def add_case(
|
42
|
-
send_post("add_case/#{
|
46
|
+
def add_case(section_id, opts = {})
|
47
|
+
send_post("add_case/#{section_id.to_s}", opts)
|
43
48
|
end
|
44
49
|
|
45
50
|
# Update test result by case id
|
46
51
|
# @param case_id [int] The id of the test case
|
47
52
|
# @param opts [hash]
|
53
|
+
# @example POST index.php?/api/v2/update_case/:case_id
|
48
54
|
# @see http://docs.gurock.com/testrail-api2/reference-cases
|
49
55
|
def update_case(case_id, opts = {})
|
50
56
|
send_post("update_case/#{case_id.to_s}", opts)
|
@@ -53,6 +59,7 @@ module Endpoints
|
|
53
59
|
# Delete test case by case id
|
54
60
|
# @param case_id [int] The id of the test case
|
55
61
|
# @param opts [hash]
|
62
|
+
# @example POST index.php?/api/v2/delete_case/:case_id
|
56
63
|
# @see http://docs.gurock.com/testrail-api2/reference-cases
|
57
64
|
def delete_case(case_id, opts = {})
|
58
65
|
send_post("delete_case/#{case_id.to_s}", opts)
|
@@ -61,6 +68,7 @@ module Endpoints
|
|
61
68
|
# Return suite by suite id
|
62
69
|
# @param suite_id [int] The suite id
|
63
70
|
# @param opts [hash]
|
71
|
+
# @example GET index.php?/api/v2/get_suite/:suite_id
|
64
72
|
# @see http://docs.gurock.com/testrail-api2/reference-suites
|
65
73
|
def get_suite(suite_id, opts = {})
|
66
74
|
send_get("get_suite/#{suite_id.to_s}", opts)
|
@@ -69,6 +77,7 @@ module Endpoints
|
|
69
77
|
# Return all suites in project by project id
|
70
78
|
# @param project_id [int] The id of the project containing suites
|
71
79
|
# @param opts [hash]
|
80
|
+
# @example GET index.php?/api/v2/get_suites/:project_id
|
72
81
|
# @see http://docs.gurock.com/testrail-api2/reference-suites
|
73
82
|
def get_suites(project_id, opts = {})
|
74
83
|
send_get("get_suites/#{project_id.to_s}", opts)
|
@@ -77,14 +86,34 @@ module Endpoints
|
|
77
86
|
# Add a test suite
|
78
87
|
# @param project_id [int] The id of the project containing suites
|
79
88
|
# @param opts [hash]
|
89
|
+
# @example POST index.php?/api/v2/add_suite/:project_id
|
80
90
|
# @see http://docs.gurock.com/testrail-api2/reference-suites
|
81
91
|
def add_suite(project_id, opts = {})
|
82
92
|
send_post("add_suite/#{project_id.to_s}", opts)
|
83
93
|
end
|
84
94
|
|
95
|
+
# update a test suite
|
96
|
+
# @param suite_id [int] The suite id
|
97
|
+
# @param opts [hash]
|
98
|
+
# @example POST index.php?/api/v2/update_suite/:suite_id
|
99
|
+
# @see http://docs.gurock.com/testrail-api2/reference-suites
|
100
|
+
def update_suite(suite_id, opts = {})
|
101
|
+
send_post("update_suite/#{suite_id.to_s}", opts)
|
102
|
+
end
|
103
|
+
|
104
|
+
# Delete a test suite
|
105
|
+
# @param suite_id [int] The suite id
|
106
|
+
# @param opts [hash]
|
107
|
+
# @example POST index.php?/api/v2/delete_suite/:suite_id
|
108
|
+
# @see http://docs.gurock.com/testrail-api2/reference-suites
|
109
|
+
def delete_suite(suite_id, opts = {})
|
110
|
+
send_post("delete_suite/#{suite_id.to_s}", opts)
|
111
|
+
end
|
112
|
+
|
85
113
|
# Return section by id
|
86
114
|
# @param section_id [int]
|
87
115
|
# @param opts [hash]
|
116
|
+
# @example GET index.php?/api/v2/get_section/:section_id
|
88
117
|
# @see http://docs.gurock.com/testrail-api2/reference-sections
|
89
118
|
def get_section(section_id, opts = {})
|
90
119
|
send_get("get_section/#{section_id.to_s}", opts)
|
@@ -93,22 +122,25 @@ module Endpoints
|
|
93
122
|
# Get sections for suite
|
94
123
|
# @param suite_id [int]
|
95
124
|
# @param opts [hash]
|
125
|
+
# @example GET index.php?/api/v2/get_sections/:project_id&suite_id=:suite_id
|
96
126
|
# @see http://docs.gurock.com/testrail-api2/reference-sections
|
97
|
-
def get_sections(suite_id, opts = {})
|
98
|
-
send_get("get_sections/#{suite_id.to_s}", opts)
|
127
|
+
def get_sections(project_id, suite_id, opts = {})
|
128
|
+
send_get("get_sections/#{project_id.to_s}&#{suite_id.to_s}", opts)
|
99
129
|
end
|
100
130
|
|
101
131
|
# Add section to suite
|
102
|
-
# @param
|
132
|
+
# @param project_id [int]
|
103
133
|
# @param opts [hash]
|
134
|
+
# @example POST index.php?/api/v2/add_section/:project_id
|
104
135
|
# @see http://docs.gurock.com/testrail-api2/reference-sections
|
105
|
-
def add_section(
|
106
|
-
send_post("add_section/#{
|
136
|
+
def add_section(project_id, opts = {})
|
137
|
+
send_post("add_section/#{project_id.to_s}", opts)
|
107
138
|
end
|
108
139
|
|
109
140
|
# Get milestone by milestone id
|
110
141
|
# @param milestone_id [int]
|
111
142
|
# @param opts [hash]
|
143
|
+
# @example GET index.php?/api/v2/get_milestone/:milestone_id
|
112
144
|
# @see http://docs.gurock.com/testrail-api2/reference-milestones
|
113
145
|
def get_milestone(milestone_id, opts = {})
|
114
146
|
send_get("get_milestone/#{milestone_id.to_s}", opts)
|
@@ -117,6 +149,7 @@ module Endpoints
|
|
117
149
|
# Get project milestones by project id
|
118
150
|
# @param project_id [int]
|
119
151
|
# @param opts [hash]
|
152
|
+
# @example GET index.php?/api/v2/get_milestones/:project_id
|
120
153
|
# @see http://docs.gurock.com/testrail-api2/reference-milestones
|
121
154
|
def get_milestones(project_id, opts = {})
|
122
155
|
send_get("get_milestones/#{project_id.to_s}", opts)
|
@@ -125,14 +158,34 @@ module Endpoints
|
|
125
158
|
# Add milestone to project id
|
126
159
|
# @param project_id [int]
|
127
160
|
# @param opts [hash]
|
161
|
+
# @example POST index.php?/api/v2/add_milestone/:project_id
|
128
162
|
# @see http://docs.gurock.com/testrail-api2/reference-milestones
|
129
163
|
def add_milestone(project_id, opts = {})
|
130
164
|
send_post("add_milestone/#{project_id.to_s}", opts)
|
131
165
|
end
|
132
166
|
|
167
|
+
# Add milestone to project id
|
168
|
+
# @param milestone_id [int]
|
169
|
+
# @param opts [hash]
|
170
|
+
# @example POST index.php?/api/v2/update_milestone/:milestone_id
|
171
|
+
# @see http://docs.gurock.com/testrail-api2/reference-milestones
|
172
|
+
def update_milestone(milestone_id, opts = {})
|
173
|
+
send_post("update_milestone/#{milestone_id.to_s}", opts)
|
174
|
+
end
|
175
|
+
|
176
|
+
# Add milestone to project id
|
177
|
+
# @param milestone_id [int]
|
178
|
+
# @param opts [hash]
|
179
|
+
# @example POST index.php?/api/v2/delete_milestone/:milestone_id
|
180
|
+
# @see http://docs.gurock.com/testrail-api2/reference-milestones
|
181
|
+
def delete_milestone(milestone_id, opts = {})
|
182
|
+
send_post("delete_milestone/#{milestone_id.to_s}", opts)
|
183
|
+
end
|
184
|
+
|
133
185
|
# Get plan by id
|
134
186
|
# @param plan_id [int]
|
135
187
|
# @param opts [hash]
|
188
|
+
# @example GET index.php?/api/v2/get_plan/:plan_id
|
136
189
|
# @see http://docs.gurock.com/testrail-api2/reference-plans
|
137
190
|
def get_plan(plan_id, opts = {})
|
138
191
|
send_get("get_plan/#{plan_id.to_s}", opts)
|
@@ -141,6 +194,7 @@ module Endpoints
|
|
141
194
|
# Get plans in project by project id
|
142
195
|
# @param project_id [int]
|
143
196
|
# @param opts [hash]
|
197
|
+
# @example GET index.php?/api/v2/get_plans/:project_id
|
144
198
|
# @see http://docs.gurock.com/testrail-api2/reference-plans
|
145
199
|
def get_plans(project_id, opts = {})
|
146
200
|
send_get("get_plans/#{project_id.to_s}", opts)
|
@@ -149,6 +203,7 @@ module Endpoints
|
|
149
203
|
# Add plan to project by project id
|
150
204
|
# @param project_id [int]
|
151
205
|
# @param opts [hash]
|
206
|
+
# @example POST index.php?/api/v2/add_plan/:project_id
|
152
207
|
# @see http://docs.gurock.com/testrail-api2/reference-plans
|
153
208
|
def add_plan(project_id, opts = {})
|
154
209
|
send_post("add_plan/#{project_id.to_s}", opts)
|
@@ -157,22 +212,55 @@ module Endpoints
|
|
157
212
|
# Add plan entries by plan id
|
158
213
|
# @param plan_id [int]
|
159
214
|
# @param opts [hash]
|
215
|
+
# @example POST index.php?/api/v2/add_plan_entry/:plan_id
|
216
|
+
# @see http://docs.gurock.com/testrail-api2/reference-plans
|
217
|
+
def add_plan_entry(plan_id, opts = {})
|
218
|
+
send_post("add_plan_entry/#{plan_id.to_s}", opts)
|
219
|
+
end
|
220
|
+
|
221
|
+
# Update plan by plan id
|
222
|
+
# @param plan_id [int]
|
223
|
+
# @param opts [hash]
|
224
|
+
# @example POST index.php?/api/v2/update_plan/:plan_id
|
225
|
+
# @see http://docs.gurock.com/testrail-api2/reference-plans
|
226
|
+
def update_plan(plan_id, opts = {})
|
227
|
+
send_post("update_plan/#{plan_id.to_s}", opts)
|
228
|
+
end
|
229
|
+
|
230
|
+
# Update plan entry by plan id
|
231
|
+
# @param plan_id [int]
|
232
|
+
# @param entry_id [int] Id of entry
|
233
|
+
# @param opts [hash]
|
234
|
+
# @example POST index.php?/api/v2/update_plan_entry/:plan_id/:entry_id
|
160
235
|
# @see http://docs.gurock.com/testrail-api2/reference-plans
|
161
|
-
def
|
162
|
-
send_post("
|
236
|
+
def update_plan_entry(plan_id, entry_id, opts = {})
|
237
|
+
send_post("update_plan_entry/#{plan_id.to_s}/#{entry_id.to_s}", opts)
|
163
238
|
end
|
164
239
|
|
165
240
|
# Close plan by plan id
|
166
241
|
# @param plan_id [int]
|
167
242
|
# @param opts [hash]
|
243
|
+
# @example POST index.php?/api/v2/close_plan/:plan_id
|
168
244
|
# @see http://docs.gurock.com/testrail-api2/reference-plans
|
169
245
|
def close_plan(plan_id, opts = {})
|
170
246
|
send_post("close_plan/#{plan_id.to_s}", opts)
|
171
247
|
end
|
172
248
|
|
249
|
+
# @example POST index.php?/api/v2/delete_plan/:plan_id
|
250
|
+
# @see http://docs.gurock.com/testrail-api2/reference-plans
|
251
|
+
def delete_plan(plan_id, opts)
|
252
|
+
send_post("delete_plan/#{plan_id.to_s}", opts)
|
253
|
+
end
|
254
|
+
|
255
|
+
# @example POST index.php?/api/v2/delete_plan_entry/:plan_id/:entry_id
|
256
|
+
def delete_plan_entry(plan_id, entry_id, opts = {})
|
257
|
+
send_post("delete_plan_entry/#{plan_id.to_s}/#{entry_id.to_s}", opts)
|
258
|
+
end
|
259
|
+
|
173
260
|
# Get project by project id
|
174
261
|
# @param project_id [int]
|
175
262
|
# @param opts [hash]
|
263
|
+
# @example GET index.php?/api/v2/get_project/:project_id
|
176
264
|
# @see http://docs.gurock.com/testrail-api2/reference-projects
|
177
265
|
def get_project(project_id, opts = {})
|
178
266
|
send_get("get_project/#{project_id.to_s}", opts)
|
@@ -180,31 +268,108 @@ module Endpoints
|
|
180
268
|
|
181
269
|
# Get all projects
|
182
270
|
# @param opts [hash]
|
271
|
+
# @example GET index.php?/api/v2/get_projects
|
183
272
|
# @see http://docs.gurock.com/testrail-api2/reference-projects
|
184
273
|
def get_projects(opts = {})
|
185
274
|
send_get('get_projects', opts)
|
186
275
|
end
|
187
276
|
|
188
|
-
# Add
|
277
|
+
# Add a project
|
278
|
+
# @param opts [hash]
|
279
|
+
# @example POST index.php?/api/v2/add_project
|
280
|
+
# @see http://docs.gurock.com/testrail-api2/reference-projects
|
281
|
+
def add_project(opts = {})
|
282
|
+
send_post("add_project", opts)
|
283
|
+
end
|
284
|
+
|
285
|
+
# Update a project
|
286
|
+
# @param project_id [int] The project you want to update
|
287
|
+
# @param opts [hash]
|
288
|
+
# @example POST index.php?/api/v2/update_project/:project_id
|
289
|
+
# @see http://docs.gurock.com/testrail-api2/reference-projects
|
290
|
+
def update_project(project_id, opts)
|
291
|
+
send_post("update_project/#{project_id.to_s}", opts)
|
292
|
+
end
|
293
|
+
|
294
|
+
|
295
|
+
# Delete a project
|
296
|
+
# @param project_id [int] The project you want to delete
|
297
|
+
# @param opts [hash]
|
298
|
+
# @example POST index.php?/api/v2/delete_project/:project_id
|
299
|
+
# @see http://docs.gurock.com/testrail-api2/reference-projects
|
300
|
+
def delete_project(project_id, opts)
|
301
|
+
send_post("delete_project/#{project_id.to_s}", opts)
|
302
|
+
end
|
303
|
+
|
304
|
+
# Returns a list of test results for a test
|
189
305
|
# @param test_id [int]
|
190
306
|
# @param opts [hash]
|
307
|
+
# @example GET index.php?/api/v2/get_results/:test_id
|
308
|
+
# @see http://docs.gurock.com/testrail-api2/reference-results
|
309
|
+
def get_results(test_id, opts = {})
|
310
|
+
send_get("get_results/#{test_id.to_s}", opts)
|
311
|
+
end
|
312
|
+
|
313
|
+
# Returns a list of test results for a test run and case combination
|
314
|
+
# @param run_id [int]
|
315
|
+
# @param case_id [int]
|
316
|
+
# @param opts [hash]
|
317
|
+
# @example GET index.php?/api/v2/get_results_for_case/:run_id/:case_id
|
318
|
+
# @see http://docs.gurock.com/testrail-api2/reference-results
|
319
|
+
def get_results_for_case(run_id, case_id, opts = {})
|
320
|
+
send_get("get_results_for_case/#{run_id.to_s}/#{case_id.to_s}", opts)
|
321
|
+
end
|
322
|
+
|
323
|
+
# Returns a list of test results for a test run
|
324
|
+
# @param run_id [int]
|
325
|
+
# @param opts [hash]
|
326
|
+
# @example GET index.php?/api/v2/get_results_for_run/:run_id
|
327
|
+
# @see http://docs.gurock.com/testrail-api2/reference-results
|
328
|
+
def get_results_for_run(run_id, opts = {})
|
329
|
+
send_get("get_results_for_run/#{run_id.to_s}", opts)
|
330
|
+
end
|
331
|
+
|
332
|
+
# Adds a new test result, comment or assigns a test. It's recommended to use add_results instead if you plan to add results for multiple tests.
|
333
|
+
# @param test_id [int]
|
334
|
+
# @param opts [hash]
|
335
|
+
# @example POST index.php?/api/v2/add_result/:test_id
|
191
336
|
# @see http://docs.gurock.com/testrail-api2/reference-results
|
192
337
|
def add_result(test_id, opts = {})
|
193
338
|
send_post("add_result/#{test_id.to_s}", opts)
|
194
339
|
end
|
195
340
|
|
196
|
-
#
|
341
|
+
# Adds a new test result, comment or assigns a test (for a test run and case combination)
|
197
342
|
# @param run_id [int]
|
198
343
|
# @param case_id [int]
|
199
344
|
# @param opts [hash]
|
345
|
+
# @example POST index.php?/api/v2/add_result_for_case/:run_id/:case_id
|
200
346
|
# @see http://docs.gurock.com/testrail-api2/reference-results
|
201
347
|
def add_result_for_case(run_id, case_id, opts = {})
|
202
348
|
send_post("add_result_for_case/#{run_id.to_s}/#{case_id.to_s}", opts)
|
203
349
|
end
|
204
350
|
|
351
|
+
# Adds one or more new test results, comments or assigns one or more tests
|
352
|
+
# @param run_id [int]
|
353
|
+
# @param opts [hash]
|
354
|
+
# @example POST index.php?/api/v2/add_results/:run_id
|
355
|
+
# @see http://docs.gurock.com/testrail-api2/reference-results
|
356
|
+
def add_results(run_id, opts = {})
|
357
|
+
send_post("add_results/#{run_id.to_s}", opts)
|
358
|
+
end
|
359
|
+
|
360
|
+
# Adds one or more new test results, comments or assigns one or more tests (using the case IDs)
|
361
|
+
# @param run_id [int]
|
362
|
+
# @param opts [hash]
|
363
|
+
# @example POST index.php?/api/v2/add_results_for_cases/:run_id
|
364
|
+
# @see http://docs.gurock.com/testrail-api2/reference-results
|
365
|
+
def add_results_for_cases(run_id, opts = {})
|
366
|
+
send_post("add_results_for_cases/#{run_id.to_s}", opts)
|
367
|
+
end
|
368
|
+
|
205
369
|
# Get run by run id
|
206
370
|
# @param run_id [int]
|
207
371
|
# @param opts [hash]
|
372
|
+
# @example GET index.php?/api/v2/get_run/:run_id
|
208
373
|
# @see http://docs.gurock.com/testrail-api2/reference-runs
|
209
374
|
def get_run(run_id, opts = {})
|
210
375
|
send_get("get_run/#{run_id.to_s}", opts)
|
@@ -214,40 +379,61 @@ module Endpoints
|
|
214
379
|
# @param project_id [int]
|
215
380
|
# @param plan_id [int]
|
216
381
|
# @param opts [hash]
|
382
|
+
# @example GET index.php?/api/v2/get_runs/:project_id
|
217
383
|
# @see http://docs.gurock.com/testrail-api2/reference-runs
|
218
|
-
# @note Might be broken
|
219
384
|
def get_runs(project_id, plan_id, opts = {})
|
220
|
-
send_get("get_runs/#{project_id.to_s}
|
385
|
+
send_get("get_runs/#{project_id.to_s}", opts)
|
221
386
|
end
|
222
387
|
|
223
388
|
# Add run by suite id
|
224
|
-
# @param
|
389
|
+
# @param project_id [int]
|
225
390
|
# @param opts [hash]
|
391
|
+
# @example POST index.php?/api/v2/add_run/:project_id
|
226
392
|
# @see http://docs.gurock.com/testrail-api2/reference-runs
|
227
|
-
def add_run(
|
228
|
-
send_post("add_run/#{
|
393
|
+
def add_run(project_id, opts = {})
|
394
|
+
send_post("add_run/#{project_id.to_s}", opts)
|
229
395
|
end
|
230
396
|
|
397
|
+
# Updates existing test run
|
398
|
+
# @param run_id [int]
|
399
|
+
# @param opts [hash]
|
400
|
+
# @example POST index.php?/api/v2/update_run/:run_id
|
401
|
+
# @see http://docs.gurock.com/testrail-api2/reference-runs
|
402
|
+
def update_run(run_id, opts = {})
|
403
|
+
send_post("update_run/#{run_id.to_s}", opts)
|
404
|
+
end
|
231
405
|
|
232
|
-
#
|
406
|
+
# Closes an existing test run and archives its tests & results
|
233
407
|
# @param run_id [int]
|
234
408
|
# @param opts [hash]
|
409
|
+
# @example POST index.php?/api/v2/close_run/:run_id
|
235
410
|
# @see http://docs.gurock.com/testrail-api2/reference-runs
|
236
411
|
def close_run(run_id, opts = {})
|
237
412
|
send_post("close_run/#{run_id.to_s}", opts)
|
238
413
|
end
|
239
414
|
|
240
|
-
#
|
415
|
+
# Deletes an existing test run.
|
416
|
+
# @param run_id [int]
|
417
|
+
# @param opts [hash]
|
418
|
+
# @example POST index.php?/api/v2/delete_run/:run_id
|
419
|
+
# @see http://docs.gurock.com/testrail-api2/reference-runs
|
420
|
+
def delete_run(run_id, opts = {})
|
421
|
+
send_post("delete_run/#{run_id.to_s}", opts)
|
422
|
+
end
|
423
|
+
|
424
|
+
# Returns an existing test
|
241
425
|
# @param test_id [int]
|
242
426
|
# @param opts [hash]
|
427
|
+
# @example GET index.php?/api/v2/get_test/:test_id
|
243
428
|
# @see http://docs.gurock.com/testrail-api2/reference-tests
|
244
429
|
def get_test(test_id, opts = {})
|
245
430
|
send_get("get_test/#{test_id.to_s}", opts)
|
246
431
|
end
|
247
432
|
|
248
|
-
#
|
433
|
+
# Returns a list of tests for a test run
|
249
434
|
# @param run_id [int]
|
250
435
|
# @param opts [hash]
|
436
|
+
# @example GET index.php?/api/v2/get_tests/:run_id
|
251
437
|
# @see http://docs.gurock.com/testrail-api2/reference-tests
|
252
438
|
def get_tests(run_id, opts = {})
|
253
439
|
send_get("get_tests/#{run_id.to_s}", opts)
|
data/lib/testrail-ruby.rb
CHANGED
@@ -5,10 +5,10 @@ require 'net/https'
|
|
5
5
|
require 'uri'
|
6
6
|
require 'json'
|
7
7
|
|
8
|
-
#
|
9
|
-
|
10
|
-
|
11
|
-
|
8
|
+
## #USAGE:
|
9
|
+
## #@client = TestRail::APIClient.new('YourBaseURLHere')
|
10
|
+
## #@client.user = 'UserName'
|
11
|
+
## #@client.password = 'Password'
|
12
12
|
|
13
13
|
module TestRail
|
14
14
|
class APIClient
|
data/lib/version.rb
CHANGED