From 0b558939d26a329206315ff424b3a1f631fd3952 Mon Sep 17 00:00:00 2001 From: Kurt Sansom Date: Thu, 19 May 2022 13:18:22 -0500 Subject: [PATCH] feat: get test run details add get_test_run method to get the test run details --- py_jama_rest_client/client.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/py_jama_rest_client/client.py b/py_jama_rest_client/client.py index 0d2480c..e86873f 100644 --- a/py_jama_rest_client/client.py +++ b/py_jama_rest_client/client.py @@ -764,6 +764,20 @@ def get_testruns(self, test_cycle_id, allowed_results_per_page=__allowed_results testrun_data = self.__get_all(resource_path, allowed_results_per_page=allowed_results_per_page) return testrun_data + def get_test_run(self, test_run_id): + """This method will get a test run details from Jama through the API + Args: + test_run_id: the api id of the test run + """ + resource_path = 'testruns/' + str(test_run_id) + try: + response = self.__core.get(resource_path) + except CoreException as err: + py_jama_rest_client_logger.error(err) + raise APIException(str(err)) + JamaClient.__handle_response_status(response) + return response.json()['data'] + def get_items_upstream_relationships(self, item_id, allowed_results_per_page=__allowed_results_per_page): """ Returns a list of all the upstream relationships for the item with the specified ID.