Skip to content

Commit 75b4454

Browse files
author
Sakari Rautiainen
authored
Merge pull request #95 from yabanjin25/master
Add function for restarting test runs and device runs
2 parents 59f2920 + 2ecd399 commit 75b4454

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

testdroid/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,14 @@ def print_project_test_runs(self, project_id, limit=0):
591591
def get_test_run(self, project_id, test_run_id):
592592
return self.get("me/projects/%s/runs/%s" % (project_id, test_run_id))
593593

594+
""" Re-run an already-existing test run. Specify individual device run IDs to only re-run those devices.
595+
"""
596+
def retry_test_run(self, project_id, test_run_id, device_run_ids=[]):
597+
endpoint = "me/projects/%s/runs/%s/retry" % (project_id, test_run_id)
598+
if device_run_ids:
599+
endpoint += "?deviceRunIds[]=" + "&deviceRunIds[]=".join(str(device_id) for device_id in device_run_ids)
600+
return self.post(endpoint)
601+
594602
"""Abort a test run
595603
"""
596604
def abort_test_run(self, project_id, test_run_id):

0 commit comments

Comments
 (0)