@@ -168,8 +168,8 @@ def update_precondition(self, precondition_key, add=None, remove=None):
168168 """
169169 Associate tests with the given pre-condition.
170170 :param precondition_key: Precondition key (eg. 'TEST-001').
171- :param add: OPTIONAL List of Test Keys to associate with the pre-condition (eg. ['TEST-2', 'TEST-3'])
172- :param remove: OPTIONAL List of Test Keys no longer associate with the pre-condition (eg. ['TEST-4', 'TEST-5'])
171+ :param add: OPTIONAL: List of Test Keys to associate with the pre-condition (eg. ['TEST-2', 'TEST-3'])
172+ :param remove: OPTIONAL: List of Test Keys no longer associate with the pre-condition (eg. ['TEST-4', 'TEST-5'])
173173 :return:
174174 """
175175 if remove is None :
@@ -191,21 +191,30 @@ def delete_test_from_precondition(self, precondition_key, test_key):
191191 return self .delete (url )
192192
193193 # Test Set API
194- def get_tests_with_test_set (self , test_set_key ):
194+ def get_tests_with_test_set (self , test_set_key , limit = None , page = None ):
195195 """
196196 Retrieve the tests associated with the given test set.
197197 :param test_set_key: Test set key (eg. 'SET-001').
198+ :param limit: OPTIONAL: Limits the number of results per page.
199+ :param page: OPTIONAL: Number of the page to be returned.
198200 :return: Return a list of the test associated with the test set.
199201 """
200202 url = 'rest/raven/1.0/api/testset/{0}/test' .format (test_set_key )
201- return self .get (url )
203+ params = {}
204+
205+ if limit :
206+ params ['limit' ] = limit
207+ if page :
208+ params ['page' ] = page
209+
210+ return self .get (url , params = params )
202211
203212 def update_test_set (self , test_set_key , add = None , remove = None ):
204213 """
205214 Associate tests with the given test set.
206215 :param test_set_key: Test set key (eg. 'SET-001').
207- :param add: OPTIONAL List of Test Keys to associate with the test set (eg. ['TEST-002', 'TEST-003'])
208- :param remove: OPTIONAL List of Test Keys no longer associate with the test set (eg. ['TEST-004', 'TEST-005'])
216+ :param add: OPTIONAL: List of Test Keys to associate with the test set (eg. ['TEST-002', 'TEST-003'])
217+ :param remove: OPTIONAL: List of Test Keys no longer associate with the test set (eg. ['TEST-004', 'TEST-005'])
209218 :return:
210219 """
211220 if add is None :
@@ -240,8 +249,8 @@ def update_test_plan(self, test_plan_key, add=None, remove=None):
240249 """
241250 Associate tests with the given test plan.
242251 :param test_plan_key: Test plan key (eg. 'PLAN-001').
243- :param add: OPTIONAL List of Test Keys to associate with the test plan (eg. ['TEST-002', 'TEST-003'])
244- :param remove: OPTIONAL List of Test Keys no longer associate with the test plan (eg. ['TEST-004', 'TEST-005'])
252+ :param add: OPTIONAL: List of Test Keys to associate with the test plan (eg. ['TEST-002', 'TEST-003'])
253+ :param remove: OPTIONAL: List of Test Keys no longer associate with the test plan (eg. ['TEST-004', 'TEST-005'])
245254 :return:
246255 """
247256 if add is None :
@@ -263,21 +272,33 @@ def delete_test_from_test_plan(self, test_plan_key, test_key):
263272 return self .delete (url )
264273
265274 # Test Executions API
266- def get_tests_with_test_execution (self , test_exec_key ):
275+ def get_tests_with_test_execution (self , test_exec_key , detailed = False , limit = None , page = None ):
267276 """
268277 Retrieve the tests associated with the given test execution.
269278 :param test_exec_key: Test execution key (eg. 'EXEC-001').
279+ :param detailed: OPTIONAL: (bool) Retrieve detailed information about the testrun
280+ :param limit: OPTIONAL: Limits the number of results per page.
281+ :param page: OPTIONAL: Number of the page to be returned.
270282 :return: Return a list of the test associated with the test execution.
271283 """
272284 url = 'rest/raven/1.0/api/testexec/{0}/test' .format (test_exec_key )
273- return self .get (url )
285+ params = {}
286+
287+ if detailed :
288+ params ['detailed' ] = detailed
289+ if limit :
290+ params ['limit' ] = limit
291+ if page :
292+ params ['page' ] = page
293+
294+ return self .get (url , params = params )
274295
275296 def update_test_execution (self , test_exec_key , add = None , remove = None ):
276297 """
277298 Associate tests with the given test execution.
278299 :param test_exec_key: Test execution key (eg. 'EXEC-001').
279- :param add: OPTIONAL List of Test Keys to associate with the test execution (eg. ['TEST-2', 'TEST-3'])
280- :param remove: OPTIONAL List of Test Keys no longer associate with the test execution (eg. ['TEST-4', 'TEST-5'])
300+ :param add: OPTIONAL: List of Test Keys to associate with the test execution (eg. ['TEST-2', 'TEST-3'])
301+ :param remove: OPTIONAL: List of Test Keys no longer associate with the test execution (eg. ['TEST-4', 'TEST-5'])
281302 :return:
282303 """
283304 if add is None :
@@ -361,8 +382,8 @@ def update_test_run_defects(self, test_run_id, add=None, remove=None):
361382 """
362383 Update the defects associated with the given test run.
363384 :param test_run_id: ID of the test run (eg. 100).
364- :param add: OPTIONAL List of defects to associate to the test run (eg. ['BUG-001', 'BUG-002'])
365- :param remove: OPTIONAL List of defects which no longer need to be associated to the test run (eg. ['BUG-003'])
385+ :param add: OPTIONAL: List of defects to associate to the test run (eg. ['BUG-001', 'BUG-002'])
386+ :param remove: OPTIONAL: List of defects which no longer need to be associated to the test run (eg. ['BUG-003'])
366387 :return:
367388 """
368389 if add is None :
0 commit comments