testrail-ruby 0.0.15 → 0.0.16
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 +195 -142
- data/lib/version.rb +1 -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: 290a3928c5e9715fffec5f817ed4535672ec0094
|
4
|
+
data.tar.gz: 7692c400ebd88ca306fc773f3bfcfa461b079103
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3bb482da53163beb434a55f1b3a391219e10e015984e74678e5bbf303714a62eb177fb641a68ff129b4241144b883fb6abd0819df8c423f16dbc355566d757ce
|
7
|
+
data.tar.gz: ae0380d34631fad8d68c85f537196559a8b95e46bc336cf9707537aa2cabd6b855c03c6f8b29785ad89e6d7a7cedfc911abc86c2be44842691c9156832595a29
|
data/lib/endpoints.rb
CHANGED
@@ -1,128 +1,142 @@
|
|
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
|
-
# @param
|
5
|
-
# @example
|
4
|
+
# @param [Hash] opts
|
5
|
+
# @example Endpoint
|
6
|
+
# index.php?/api/v2/get_case/:case_id
|
6
7
|
# @see http://docs.gurock.com/testrail-api2/reference-cases
|
7
8
|
def get_case(case_id, opts = {})
|
8
|
-
send_get("get_case
|
9
|
+
send_get("get_case/:#{case_id.to_s}", opts)
|
9
10
|
end
|
10
11
|
|
11
12
|
# Returns a list of test cases for a test suite or specific section in a test suite.
|
12
13
|
# @param project_id [int] The id of the project that contains your tests
|
13
|
-
# @param
|
14
|
-
# @example
|
14
|
+
# @param [Hash] opts
|
15
|
+
# @example Endpoint
|
16
|
+
# index.php?/api/v2/get_cases/:project_id
|
15
17
|
# @see http://docs.gurock.com/testrail-api2/reference-cases
|
16
18
|
def get_cases(project_id, opts = {})
|
17
|
-
send_get("get_cases
|
19
|
+
send_get("get_cases/:#{project_id.to_s}", opts)
|
18
20
|
end
|
19
21
|
|
20
22
|
# Return all test cases in a given project by suite_id and section_id
|
21
23
|
# @param project_id [int] The id of the project that contains your tests
|
22
24
|
# @param suite_id [int] The id of the suite within the project
|
23
25
|
# @param section_id [int] The id of the section within the suite
|
24
|
-
# @param
|
25
|
-
# @example
|
26
|
+
# @param [Hash] opts
|
27
|
+
# @example Endpoint
|
28
|
+
# index.php?/api/v2/get_cases/:project_id&suite_id=:suite_id§ion_id=:section_id
|
26
29
|
# @see http://docs.gurock.com/testrail-api2/reference-cases
|
27
30
|
def get_cases_by_section(project_id, suite_id, section_id, opts = {})
|
28
|
-
send_get("get_cases
|
31
|
+
send_get("get_cases/:#{project_id.to_s}&suite_id=:#{suite_id.to_s}§ion_id=:#{section_id.to_s}", opts)
|
29
32
|
end
|
30
33
|
|
31
34
|
# Return all test cases in a given project by suite_id
|
32
35
|
# @param project_id [int] The id of the project that contains your tests
|
33
36
|
# @param suite_id [int] The id of the suite within the project
|
34
|
-
# @param
|
35
|
-
# @example
|
37
|
+
# @param [Hash] opts
|
38
|
+
# @example Endpoint
|
39
|
+
# index.php?/api/v2/get_cases/:project_id&suite_id=:suite_id
|
36
40
|
# @see http://docs.gurock.com/testrail-api2/reference-cases
|
37
41
|
def get_cases_by_suite(project_id, suite_id, opts = {})
|
38
|
-
send_get("get_cases
|
42
|
+
send_get("get_cases/:#{project_id.to_s}&suite_id=:#{suite_id.to_s}", opts)
|
39
43
|
end
|
40
44
|
|
41
45
|
# Creates a new test case
|
42
46
|
# @param section_id [int] The id of the test case
|
43
|
-
# @param
|
44
|
-
# @example
|
47
|
+
# @param [Hash] opts
|
48
|
+
# @example Endpoint
|
49
|
+
# index.php?/api/v2/add_case/:section_id
|
45
50
|
# @see http://docs.gurock.com/testrail-api2/reference-cases
|
46
51
|
def add_case(section_id, opts = {})
|
47
|
-
send_post("add_case
|
52
|
+
send_post("add_case/:#{section_id.to_s}", opts)
|
48
53
|
end
|
49
54
|
|
50
55
|
# Update test result by case id
|
51
56
|
# @param case_id [int] The id of the test case
|
52
|
-
# @param
|
53
|
-
# @example
|
57
|
+
# @param [Hash] opts
|
58
|
+
# @example Endpoint
|
59
|
+
# index.php?/api/v2/update_case/:case_id
|
54
60
|
# @see http://docs.gurock.com/testrail-api2/reference-cases
|
55
61
|
def update_case(case_id, opts = {})
|
56
|
-
send_post("update_case
|
62
|
+
send_post("update_case/:#{case_id.to_s}", opts)
|
57
63
|
end
|
58
64
|
|
59
65
|
# Delete test case by case id
|
60
66
|
# @param case_id [int] The id of the test case
|
61
|
-
# @param
|
62
|
-
# @example
|
67
|
+
# @param [Hash] opts
|
68
|
+
# @example Endpoint
|
69
|
+
# index.php?/api/v2/delete_case/:case_id
|
63
70
|
# @see http://docs.gurock.com/testrail-api2/reference-cases
|
64
71
|
def delete_case(case_id, opts = {})
|
65
|
-
send_post("delete_case
|
72
|
+
send_post("delete_case/:#{case_id.to_s}", opts)
|
66
73
|
end
|
67
74
|
|
68
75
|
# Return suite by suite id
|
69
76
|
# @param suite_id [int] The suite id
|
70
|
-
# @param
|
71
|
-
# @example
|
77
|
+
# @param [Hash] opts
|
78
|
+
# @example Endpoint
|
79
|
+
# index.php?/api/v2/get_suite/:suite_id
|
72
80
|
# @see http://docs.gurock.com/testrail-api2/reference-suites
|
73
81
|
def get_suite(suite_id, opts = {})
|
74
|
-
send_get("get_suite
|
82
|
+
send_get("get_suite/:#{suite_id.to_s}", opts)
|
75
83
|
end
|
76
84
|
|
77
85
|
# Return all suites in project by project id
|
78
86
|
# @param project_id [int] The id of the project containing suites
|
79
|
-
# @param
|
80
|
-
# @example
|
87
|
+
# @param [Hash] opts
|
88
|
+
# @example Endpoint
|
89
|
+
# index.php?/api/v2/get_suites/:project_id
|
81
90
|
# @see http://docs.gurock.com/testrail-api2/reference-suites
|
82
91
|
def get_suites(project_id, opts = {})
|
83
|
-
send_get("get_suites
|
92
|
+
send_get("get_suites/:#{project_id.to_s}", opts)
|
84
93
|
end
|
85
94
|
|
86
95
|
# Add a test suite
|
87
96
|
# @param project_id [int] The id of the project containing suites
|
88
|
-
# @param
|
89
|
-
# @example
|
97
|
+
# @param [Hash] opts
|
98
|
+
# @example Endpoint
|
99
|
+
# index.php?/api/v2/add_suite/:project_id
|
90
100
|
# @see http://docs.gurock.com/testrail-api2/reference-suites
|
91
101
|
def add_suite(project_id, opts = {})
|
92
|
-
send_post("add_suite
|
102
|
+
send_post("add_suite/:#{project_id.to_s}", opts)
|
93
103
|
end
|
94
104
|
|
95
105
|
# update a test suite
|
96
106
|
# @param suite_id [int] The suite id
|
97
|
-
# @param
|
98
|
-
# @example
|
107
|
+
# @param [Hash] opts
|
108
|
+
# @example Endpoint
|
109
|
+
# index.php?/api/v2/update_suite/:suite_id
|
99
110
|
# @see http://docs.gurock.com/testrail-api2/reference-suites
|
100
111
|
def update_suite(suite_id, opts = {})
|
101
|
-
send_post("update_suite
|
112
|
+
send_post("update_suite/:#{suite_id.to_s}", opts)
|
102
113
|
end
|
103
114
|
|
104
115
|
# Delete a test suite
|
105
116
|
# @param suite_id [int] The suite id
|
106
|
-
# @param
|
107
|
-
# @example
|
117
|
+
# @param [Hash] opts
|
118
|
+
# @example Endpoint
|
119
|
+
# index.php?/api/v2/delete_suite/:suite_id
|
108
120
|
# @see http://docs.gurock.com/testrail-api2/reference-suites
|
109
121
|
def delete_suite(suite_id, opts = {})
|
110
|
-
send_post("delete_suite
|
122
|
+
send_post("delete_suite/:#{suite_id.to_s}", opts)
|
111
123
|
end
|
112
124
|
|
113
125
|
# Return section by id
|
114
126
|
# @param section_id [int]
|
115
|
-
# @param
|
116
|
-
# @example
|
127
|
+
# @param [Hash] opts
|
128
|
+
# @example Endpoint
|
129
|
+
# index.php?/api/v2/get_section/:section_id
|
117
130
|
# @see http://docs.gurock.com/testrail-api2/reference-sections
|
118
131
|
def get_section(section_id, opts = {})
|
119
|
-
send_get("get_section
|
132
|
+
send_get("get_section/:#{section_id.to_s}", opts)
|
120
133
|
end
|
121
134
|
|
122
135
|
# Get sections for suite
|
123
136
|
# @param suite_id [int]
|
124
|
-
# @param
|
125
|
-
# @example
|
137
|
+
# @param [Hash] opts
|
138
|
+
# @example Endpoint
|
139
|
+
# index.php?/api/v2/get_sections/:project_id&suite_id=:suite_id
|
126
140
|
# @see http://docs.gurock.com/testrail-api2/reference-sections
|
127
141
|
def get_sections(project_id, suite_id, opts = {})
|
128
142
|
send_get("get_sections/#{project_id.to_s}&suite_id=#{suite_id.to_s}", opts)
|
@@ -130,154 +144,176 @@ module Endpoints
|
|
130
144
|
|
131
145
|
# Add section to suite
|
132
146
|
# @param project_id [int]
|
133
|
-
# @param
|
134
|
-
# @
|
147
|
+
# @param [Hash] opts
|
148
|
+
# @option opts [Int] suite_id
|
149
|
+
# @option opts [String] name
|
150
|
+
# @option opts [Int] parent_id
|
151
|
+
# @example Endpoint
|
152
|
+
# index.php?/api/v2/add_section/:project_id
|
153
|
+
# @example Code
|
154
|
+
# @client.add_section(1, {"suite_id": 5, "name": "This is a new section", "parent_id": 10})
|
135
155
|
# @see http://docs.gurock.com/testrail-api2/reference-sections
|
136
|
-
|
137
|
-
|
138
|
-
send_post("add_section/#{project_id.to_s}&suite_id=#{suite_id.to_s}", opts)
|
156
|
+
def add_section(project_id, opts = {})
|
157
|
+
send_post("add_section/#{project_id.to_s}", opts)
|
139
158
|
end
|
140
159
|
|
141
160
|
# Get milestone by milestone id
|
142
161
|
# @param milestone_id [int]
|
143
|
-
# @param
|
144
|
-
# @example
|
162
|
+
# @param [Hash] opts
|
163
|
+
# @example Endpoint
|
164
|
+
# index.php?/api/v2/get_milestone/:milestone_id
|
145
165
|
# @see http://docs.gurock.com/testrail-api2/reference-milestones
|
146
166
|
def get_milestone(milestone_id, opts = {})
|
147
|
-
send_get("get_milestone
|
167
|
+
send_get("get_milestone/:#{milestone_id.to_s}", opts)
|
148
168
|
end
|
149
169
|
|
150
170
|
# Get project milestones by project id
|
151
171
|
# @param project_id [int]
|
152
|
-
# @param
|
153
|
-
# @example
|
172
|
+
# @param [Hash] opts
|
173
|
+
# @example Endpoint
|
174
|
+
# index.php?/api/v2/get_milestones/:project_id
|
154
175
|
# @see http://docs.gurock.com/testrail-api2/reference-milestones
|
155
176
|
def get_milestones(project_id, opts = {})
|
156
|
-
send_get("get_milestones
|
177
|
+
send_get("get_milestones/:#{project_id.to_s}", opts)
|
157
178
|
end
|
158
179
|
|
159
180
|
# Add milestone to project id
|
160
181
|
# @param project_id [int]
|
161
|
-
# @param
|
162
|
-
# @example
|
182
|
+
# @param [Hash] opts
|
183
|
+
# @example Endpoint
|
184
|
+
# index.php?/api/v2/add_milestone/:project_id
|
163
185
|
# @see http://docs.gurock.com/testrail-api2/reference-milestones
|
164
186
|
def add_milestone(project_id, opts = {})
|
165
|
-
send_post("add_milestone
|
187
|
+
send_post("add_milestone/:#{project_id.to_s}", opts)
|
166
188
|
end
|
167
189
|
|
168
190
|
# Add milestone to project id
|
169
191
|
# @param milestone_id [int]
|
170
|
-
# @param
|
171
|
-
# @example
|
192
|
+
# @param [Hash] opts
|
193
|
+
# @example Endpoint
|
194
|
+
# index.php?/api/v2/update_milestone/:milestone_id
|
172
195
|
# @see http://docs.gurock.com/testrail-api2/reference-milestones
|
173
196
|
def update_milestone(milestone_id, opts = {})
|
174
|
-
send_post("update_milestone
|
197
|
+
send_post("update_milestone/:#{milestone_id.to_s}", opts)
|
175
198
|
end
|
176
199
|
|
177
200
|
# Add milestone to project id
|
178
201
|
# @param milestone_id [int]
|
179
|
-
# @param
|
180
|
-
# @example
|
202
|
+
# @param [Hash] opts
|
203
|
+
# @example Endpoint
|
204
|
+
# index.php?/api/v2/delete_milestone/:milestone_id
|
181
205
|
# @see http://docs.gurock.com/testrail-api2/reference-milestones
|
182
206
|
def delete_milestone(milestone_id, opts = {})
|
183
|
-
send_post("delete_milestone
|
207
|
+
send_post("delete_milestone/:#{milestone_id.to_s}", opts)
|
184
208
|
end
|
185
209
|
|
186
210
|
# Get plan by id
|
187
211
|
# @param plan_id [int]
|
188
|
-
# @param
|
189
|
-
# @example
|
212
|
+
# @param [Hash] opts
|
213
|
+
# @example Endpoint
|
214
|
+
# index.php?/api/v2/get_plan/:plan_id
|
190
215
|
# @see http://docs.gurock.com/testrail-api2/reference-plans
|
191
216
|
def get_plan(plan_id, opts = {})
|
192
|
-
send_get("get_plan
|
217
|
+
send_get("get_plan/:#{plan_id.to_s}", opts)
|
193
218
|
end
|
194
219
|
|
195
220
|
# Get plans in project by project id
|
196
221
|
# @param project_id [int]
|
197
|
-
# @param
|
198
|
-
# @example
|
222
|
+
# @param [Hash] opts
|
223
|
+
# @example Endpoint
|
224
|
+
# index.php?/api/v2/get_plans/:project_id
|
199
225
|
# @see http://docs.gurock.com/testrail-api2/reference-plans
|
200
226
|
def get_plans(project_id, opts = {})
|
201
|
-
send_get("get_plans
|
227
|
+
send_get("get_plans/:#{project_id.to_s}", opts)
|
202
228
|
end
|
203
229
|
|
204
230
|
# Add plan to project by project id
|
205
231
|
# @param project_id [int]
|
206
|
-
# @param
|
207
|
-
# @example
|
232
|
+
# @param [Hash] opts
|
233
|
+
# @example Endpoint
|
234
|
+
# index.php?/api/v2/add_plan/:project_id
|
208
235
|
# @see http://docs.gurock.com/testrail-api2/reference-plans
|
209
236
|
def add_plan(project_id, opts = {})
|
210
|
-
send_post("add_plan
|
237
|
+
send_post("add_plan/:#{project_id.to_s}", opts)
|
211
238
|
end
|
212
239
|
|
213
240
|
# Add plan entries by plan id
|
214
241
|
# @param plan_id [int]
|
215
|
-
# @param
|
216
|
-
# @example
|
242
|
+
# @param [Hash] opts
|
243
|
+
# @example Endpoint
|
244
|
+
# index.php?/api/v2/add_plan_entry/:plan_id
|
217
245
|
# @see http://docs.gurock.com/testrail-api2/reference-plans
|
218
246
|
def add_plan_entry(plan_id, opts = {})
|
219
|
-
send_post("add_plan_entry
|
247
|
+
send_post("add_plan_entry/:#{plan_id.to_s}", opts)
|
220
248
|
end
|
221
249
|
|
222
250
|
# Update plan by plan id
|
223
251
|
# @param plan_id [int]
|
224
|
-
# @param
|
225
|
-
# @example
|
252
|
+
# @param [Hash] opts
|
253
|
+
# @example Endpoint
|
254
|
+
# index.php?/api/v2/update_plan/:plan_id
|
226
255
|
# @see http://docs.gurock.com/testrail-api2/reference-plans
|
227
256
|
def update_plan(plan_id, opts = {})
|
228
|
-
send_post("update_plan
|
257
|
+
send_post("update_plan/:#{plan_id.to_s}", opts)
|
229
258
|
end
|
230
259
|
|
231
260
|
# Update plan entry by plan id
|
232
261
|
# @param plan_id [int]
|
233
262
|
# @param entry_id [int] Id of entry
|
234
|
-
# @param
|
235
|
-
# @example
|
263
|
+
# @param [Hash] opts
|
264
|
+
# @example Endpoint
|
265
|
+
# index.php?/api/v2/update_plan_entry/:plan_id/:entry_id
|
236
266
|
# @see http://docs.gurock.com/testrail-api2/reference-plans
|
237
267
|
def update_plan_entry(plan_id, entry_id, opts = {})
|
238
|
-
send_post("update_plan_entry
|
268
|
+
send_post("update_plan_entry/:#{plan_id.to_s}/:#{entry_id.to_s}", opts)
|
239
269
|
end
|
240
270
|
|
241
271
|
# Close plan by plan id
|
242
272
|
# @param plan_id [int]
|
243
|
-
# @param
|
244
|
-
# @example
|
273
|
+
# @param [Hash] opts
|
274
|
+
# @example Endpoint
|
275
|
+
# index.php?/api/v2/close_plan/:plan_id
|
245
276
|
# @see http://docs.gurock.com/testrail-api2/reference-plans
|
246
277
|
def close_plan(plan_id, opts = {})
|
247
|
-
send_post("close_plan
|
278
|
+
send_post("close_plan/:#{plan_id.to_s}", opts)
|
248
279
|
end
|
249
280
|
|
250
|
-
# @example
|
281
|
+
# @example Endpoint
|
282
|
+
# index.php?/api/v2/delete_plan/:plan_id
|
251
283
|
# @see http://docs.gurock.com/testrail-api2/reference-plans
|
252
284
|
def delete_plan(plan_id, opts)
|
253
|
-
send_post("delete_plan
|
285
|
+
send_post("delete_plan/:#{plan_id.to_s}", opts)
|
254
286
|
end
|
255
287
|
|
256
|
-
# @example
|
288
|
+
# @example Endpoint
|
289
|
+
# index.php?/api/v2/delete_plan_entry/:plan_id/:entry_id
|
257
290
|
def delete_plan_entry(plan_id, entry_id, opts = {})
|
258
|
-
send_post("delete_plan_entry
|
291
|
+
send_post("delete_plan_entry/:#{plan_id.to_s}/:#{entry_id.to_s}", opts)
|
259
292
|
end
|
260
293
|
|
261
294
|
# Get project by project id
|
262
295
|
# @param project_id [int]
|
263
|
-
# @param
|
264
|
-
# @example
|
296
|
+
# @param [Hash] opts
|
297
|
+
# @example Endpoint
|
298
|
+
# index.php?/api/v2/get_project/:project_id
|
265
299
|
# @see http://docs.gurock.com/testrail-api2/reference-projects
|
266
300
|
def get_project(project_id, opts = {})
|
267
|
-
send_get("get_project
|
301
|
+
send_get("get_project/:#{project_id.to_s}", opts)
|
268
302
|
end
|
269
303
|
|
270
304
|
# Get all projects
|
271
|
-
# @param
|
272
|
-
# @example
|
305
|
+
# @param [Hash] opts
|
306
|
+
# @example Endpoint
|
307
|
+
# index.php?/api/v2/get_projects
|
273
308
|
# @see http://docs.gurock.com/testrail-api2/reference-projects
|
274
309
|
def get_projects(opts = {})
|
275
310
|
send_get('get_projects', opts)
|
276
311
|
end
|
277
312
|
|
278
313
|
# Add a project
|
279
|
-
# @param
|
280
|
-
# @example
|
314
|
+
# @param [Hash] opts
|
315
|
+
# @example Endpoint
|
316
|
+
# index.php?/api/v2/add_project
|
281
317
|
# @see http://docs.gurock.com/testrail-api2/reference-projects
|
282
318
|
def add_project(opts = {})
|
283
319
|
send_post("add_project", opts)
|
@@ -285,102 +321,113 @@ module Endpoints
|
|
285
321
|
|
286
322
|
# Update a project
|
287
323
|
# @param project_id [int] The project you want to update
|
288
|
-
# @param
|
289
|
-
# @example
|
324
|
+
# @param [Hash] opts
|
325
|
+
# @example Endpoint
|
326
|
+
# index.php?/api/v2/update_project/:project_id
|
290
327
|
# @see http://docs.gurock.com/testrail-api2/reference-projects
|
291
328
|
def update_project(project_id, opts)
|
292
|
-
send_post("update_project
|
329
|
+
send_post("update_project/:#{project_id.to_s}", opts)
|
293
330
|
end
|
294
331
|
|
295
332
|
|
296
333
|
# Delete a project
|
297
334
|
# @param project_id [int] The project you want to delete
|
298
|
-
# @param
|
299
|
-
# @example
|
335
|
+
# @param [Hash] opts
|
336
|
+
# @example Endpoint
|
337
|
+
# index.php?/api/v2/delete_project/:project_id
|
300
338
|
# @see http://docs.gurock.com/testrail-api2/reference-projects
|
301
339
|
def delete_project(project_id, opts)
|
302
|
-
send_post("delete_project
|
340
|
+
send_post("delete_project/:#{project_id.to_s}", opts)
|
303
341
|
end
|
304
342
|
|
305
343
|
# Returns a list of test results for a test
|
306
344
|
# @param test_id [int]
|
307
|
-
# @param
|
308
|
-
# @example
|
345
|
+
# @param [Hash] opts
|
346
|
+
# @example Endpoint
|
347
|
+
# index.php?/api/v2/get_results/:test_id
|
309
348
|
# @see http://docs.gurock.com/testrail-api2/reference-results
|
310
349
|
def get_results(test_id, opts = {})
|
311
|
-
send_get("get_results
|
350
|
+
send_get("get_results/:#{test_id.to_s}", opts)
|
312
351
|
end
|
313
352
|
|
314
353
|
# Returns a list of test results for a test run and case combination
|
315
354
|
# @param run_id [int]
|
316
355
|
# @param case_id [int]
|
317
|
-
# @param
|
318
|
-
# @example
|
356
|
+
# @param [Hash] opts
|
357
|
+
# @example Endpoint
|
358
|
+
# index.php?/api/v2/get_results_for_case/:run_id/:case_id
|
319
359
|
# @see http://docs.gurock.com/testrail-api2/reference-results
|
320
360
|
def get_results_for_case(run_id, case_id, opts = {})
|
321
|
-
send_get("get_results_for_case
|
361
|
+
send_get("get_results_for_case/:#{run_id.to_s}/:#{case_id.to_s}", opts)
|
322
362
|
end
|
323
363
|
|
324
364
|
# Returns a list of test results for a test run
|
325
365
|
# @param run_id [int]
|
326
|
-
# @param
|
327
|
-
# @example
|
366
|
+
# @param [Hash] opts
|
367
|
+
# @example Endpoint
|
368
|
+
# index.php?/api/v2/get_results_for_run/:run_id
|
328
369
|
# @see http://docs.gurock.com/testrail-api2/reference-results
|
329
370
|
def get_results_for_run(run_id, opts = {})
|
330
|
-
send_get("get_results_for_run
|
371
|
+
send_get("get_results_for_run/:#{run_id.to_s}", opts)
|
331
372
|
end
|
332
373
|
|
333
374
|
# 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.
|
334
375
|
# @param test_id [int]
|
335
|
-
# @param
|
336
|
-
# @example
|
376
|
+
# @param [Hash] opts
|
377
|
+
# @example Endpoint
|
378
|
+
# index.php?/api/v2/add_result/:test_id
|
337
379
|
# @see http://docs.gurock.com/testrail-api2/reference-results
|
338
380
|
def add_result(test_id, opts = {})
|
339
|
-
send_post("add_result
|
381
|
+
send_post("add_result/:#{test_id.to_s}", opts)
|
340
382
|
end
|
341
383
|
|
342
384
|
# Adds a new test result, comment or assigns a test (for a test run and case combination)
|
343
385
|
# @param run_id [int]
|
344
386
|
# @param case_id [int]
|
345
|
-
# @param
|
346
|
-
# @example
|
387
|
+
# @param [Hash] opts
|
388
|
+
# @example Endpoint
|
389
|
+
# index.php?/api/v2/add_result_for_case/:run_id/:case_id
|
347
390
|
# @see http://docs.gurock.com/testrail-api2/reference-results
|
348
391
|
def add_result_for_case(run_id, case_id, opts = {})
|
349
|
-
send_post("add_result_for_case
|
392
|
+
send_post("add_result_for_case/:#{run_id.to_s}/:#{case_id.to_s}", opts)
|
350
393
|
end
|
351
394
|
|
352
395
|
# Adds one or more new test results, comments or assigns one or more tests
|
353
396
|
# @param run_id [int]
|
354
|
-
# @param
|
355
|
-
# @example
|
397
|
+
# @param [Hash] opts
|
398
|
+
# @example Endpoint
|
399
|
+
# index.php?/api/v2/add_results/:run_id
|
356
400
|
# @see http://docs.gurock.com/testrail-api2/reference-results
|
357
401
|
def add_results(run_id, opts = {})
|
358
|
-
send_post("add_results
|
402
|
+
send_post("add_results/:#{run_id.to_s}", opts)
|
359
403
|
end
|
360
404
|
|
361
405
|
# Adds one or more new test results, comments or assigns one or more tests (using the case IDs)
|
362
406
|
# @param run_id [int]
|
363
|
-
# @param
|
364
|
-
# @example
|
407
|
+
# @param [Hash] opts
|
408
|
+
# @example Endpoint
|
409
|
+
# index.php?/api/v2/add_results_for_cases/:run_id
|
365
410
|
# @see http://docs.gurock.com/testrail-api2/reference-results
|
366
411
|
def add_results_for_cases(run_id, opts = {})
|
367
|
-
send_post("add_results_for_cases
|
412
|
+
send_post("add_results_for_cases/:#{run_id.to_s}", opts)
|
368
413
|
end
|
369
414
|
|
370
415
|
# Get run by run id
|
371
416
|
# @param run_id [int]
|
372
|
-
# @param
|
373
|
-
# @example
|
417
|
+
# @param [Hash] opts
|
418
|
+
# @example Endpoint
|
419
|
+
# index.php?/api/v2/get_run/:run_id
|
374
420
|
# @see http://docs.gurock.com/testrail-api2/reference-runs
|
375
421
|
def get_run(run_id, opts = {})
|
376
|
-
send_get("get_run
|
422
|
+
send_get("get_run/:#{run_id.to_s}", opts)
|
377
423
|
end
|
378
424
|
|
379
425
|
# Get runs by project id
|
380
426
|
# @param project_id [int]
|
381
427
|
# @param plan_id [int]
|
382
|
-
# @param
|
383
|
-
# @example
|
428
|
+
# @param [Hash] opts
|
429
|
+
# @example Endpoint
|
430
|
+
# index.php?/api/v2/get_runs/:project_id
|
384
431
|
# @see http://docs.gurock.com/testrail-api2/reference-runs
|
385
432
|
def get_runs(project_id, opts = {})
|
386
433
|
send_get("get_runs/#{project_id.to_s}", opts)
|
@@ -388,26 +435,29 @@ module Endpoints
|
|
388
435
|
|
389
436
|
# Add run by suite id
|
390
437
|
# @param project_id [int]
|
391
|
-
# @param
|
392
|
-
# @example
|
438
|
+
# @param [Hash] opts
|
439
|
+
# @example Endpoint
|
440
|
+
# index.php?/api/v2/add_run/:project_id
|
393
441
|
# @see http://docs.gurock.com/testrail-api2/reference-runs
|
394
442
|
def add_run(project_id, opts = {})
|
395
|
-
send_post("add_run
|
443
|
+
send_post("add_run/:#{project_id.to_s}", opts)
|
396
444
|
end
|
397
445
|
|
398
446
|
# Updates existing test run
|
399
447
|
# @param run_id [int]
|
400
|
-
# @param
|
401
|
-
# @example
|
448
|
+
# @param [Hash] opts
|
449
|
+
# @example Endpoint
|
450
|
+
# index.php?/api/v2/update_run/:run_id
|
402
451
|
# @see http://docs.gurock.com/testrail-api2/reference-runs
|
403
452
|
def update_run(run_id, opts = {})
|
404
|
-
send_post("update_run
|
453
|
+
send_post("update_run/:#{run_id.to_s}", opts)
|
405
454
|
end
|
406
455
|
|
407
456
|
# Closes an existing test run and archives its tests & results
|
408
457
|
# @param run_id [int]
|
409
|
-
# @param
|
410
|
-
# @example
|
458
|
+
# @param [Hash] opts
|
459
|
+
# @example Endpoint
|
460
|
+
# index.php?/api/v2/close_run/:run_id
|
411
461
|
# @see http://docs.gurock.com/testrail-api2/reference-runs
|
412
462
|
def close_run(run_id, opts = {})
|
413
463
|
send_post("close_run/#{run_id.to_s}", opts)
|
@@ -415,29 +465,32 @@ module Endpoints
|
|
415
465
|
|
416
466
|
# Deletes an existing test run.
|
417
467
|
# @param run_id [int]
|
418
|
-
# @param
|
419
|
-
# @example
|
468
|
+
# @param [Hash] opts
|
469
|
+
# @example Endpoint
|
470
|
+
# index.php?/api/v2/delete_run/:run_id
|
420
471
|
# @see http://docs.gurock.com/testrail-api2/reference-runs
|
421
472
|
def delete_run(run_id, opts = {})
|
422
|
-
send_post("delete_run
|
473
|
+
send_post("delete_run/:#{run_id.to_s}", opts)
|
423
474
|
end
|
424
475
|
|
425
476
|
# Returns an existing test
|
426
477
|
# @param test_id [int]
|
427
|
-
# @param
|
428
|
-
# @example
|
478
|
+
# @param [Hash] opts
|
479
|
+
# @example Endpoint
|
480
|
+
# index.php?/api/v2/get_test/:test_id
|
429
481
|
# @see http://docs.gurock.com/testrail-api2/reference-tests
|
430
482
|
def get_test(test_id, opts = {})
|
431
|
-
send_get("get_test
|
483
|
+
send_get("get_test/:#{test_id.to_s}", opts)
|
432
484
|
end
|
433
485
|
|
434
486
|
# Returns a list of tests for a test run
|
435
487
|
# @param run_id [int]
|
436
|
-
# @param
|
437
|
-
# @example
|
488
|
+
# @param [Hash] opts
|
489
|
+
# @example Endpoint
|
490
|
+
# index.php?/api/v2/get_tests/:run_id
|
438
491
|
# @see http://docs.gurock.com/testrail-api2/reference-tests
|
439
492
|
def get_tests(run_id, opts = {})
|
440
|
-
send_get("get_tests
|
493
|
+
send_get("get_tests/:#{run_id.to_s}", opts)
|
441
494
|
end
|
442
495
|
|
443
496
|
end
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: testrail-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frances Morales
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-06-
|
11
|
+
date: 2017-06-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|