@@ -275,6 +275,41 @@ def delete_test_from_test_plan(self, test_plan_key, test_key):
275275 url = "rest/raven/1.0/api/testplan/{0}/test/{1}" .format (test_plan_key , test_key )
276276 return self .delete (url )
277277
278+ def get_test_executions_with_test_plan (self , test_plan_key ):
279+ """
280+ Retrieve test executions associated with the given test plan.
281+ :param test_plan_key: Test plan key (eg. 'PLAN-001').
282+ :return: Return a list of the test executions associated with the test plan.
283+ """
284+ url = "rest/raven/1.0/api/testplan/{0}/testexecution" .format (test_plan_key )
285+ return self .get (url )
286+
287+ def update_test_plan_test_executions (self , test_plan_key , add = None , remove = None ):
288+ """
289+ Associate test executions with the given test plan.
290+ :param test_plan_key: Test plan key (eg. 'PLAN-001').
291+ :param add: OPTIONAL: List of Test Keys to associate with the test plan (eg. ['TEST-002', 'TEST-003'])
292+ :param remove: OPTIONAL: List of Test Keys no longer associate with the test plan (eg. ['TEST-004', 'TEST-005'])
293+ :return:
294+ """
295+ if add is None :
296+ add = []
297+ if remove is None :
298+ remove = []
299+ update = {"add" : add , "remove" : remove }
300+ url = "rest/raven/1.0/api/testplan/{0}/testexecution" .format (test_plan_key )
301+ return self .post (url , update )
302+
303+ def delete_test_execution_from_test_plan (self , test_plan_key , test_exec_key ):
304+ """
305+ Remove association of the specified tests execution from the given test plan.
306+ :param test_plan_key: Test plan key (eg. 'PLAN-001').
307+ :param test_exec_key: Test execution Key which should no longer be associate with the test plan (eg. 'TEST-100')
308+ :return:
309+ """
310+ url = "rest/raven/1.0/api/testplan/{0}/testexecution/{1}" .format (test_plan_key , test_exec_key )
311+ return self .delete (url )
312+
278313 # Test Executions API
279314 def get_tests_with_test_execution (self , test_exec_key , detailed = False , limit = None , page = None ):
280315 """
0 commit comments