Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: get test run details #44

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions py_jama_rest_client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down