diff --git a/py_jama_rest_client/client.py b/py_jama_rest_client/client.py index 4c0a953..7aa1cb6 100644 --- a/py_jama_rest_client/client.py +++ b/py_jama_rest_client/client.py @@ -764,6 +764,34 @@ 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_testrun(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_testrun_lock(self, test_run_id): + """This method will return a single test run lock status. + Args: + test_run_id: the api id of the test run + """ + resource_path = 'testruns/' + str(test_run_id) + '/lock' + 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.