Skip to content

Latest commit

 

History

History
652 lines (472 loc) · 24.7 KB

TestrunApi.md

File metadata and controls

652 lines (472 loc) · 24.7 KB

swagger_client.TestrunApi

All URIs are relative to https://apitryout.qtestnet.com/

Method HTTP request Description
add_comment POST /api/v3/projects/{projectId}/test-runs/{idOrKey}/comments Adds a Comment to a Test Run
create POST /api/v3/projects/{projectId}/test-runs Creates a Test Run
delete DELETE /api/v3/projects/{projectId}/test-runs/{testRunId} Deletes a Test Run
delete_comment DELETE /api/v3/projects/{projectId}/test-runs/{idOrKey}/comments/{commentId} Deletes a Comment of a Test Run
get GET /api/v3/projects/{projectId}/test-runs/{testRunId} Gets a Test Run
get_comment GET /api/v3/projects/{projectId}/test-runs/{idOrKey}/comments/{commentId} Gets a Comment from a Test Run
get_comments GET /api/v3/projects/{projectId}/test-runs/{idOrKey}/comments Gets all Comments of a Test Run
get_of GET /api/v3/projects/{projectId}/test-runs Gets multiple Test Runs
get_status_valuable GET /api/v3/projects/{projectId}/test-runs/execution-statuses Gets Test Run statuses
update PUT /api/v3/projects/{projectId}/test-runs/{testRunId} Updates a Test Run
update_comment PUT /api/v3/projects/{projectId}/test-runs/{idOrKey}/comments/{commentId} Updates a Comment of a Test Run

add_comment

CommentResource add_comment(project_id, id_or_key, body)

Adds a Comment to a Test Run

To add a Comment to a Test Run qTest Manager version: 7.5+

Example

from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.TestrunApi()
project_id = 789 # int | ID of the project
id_or_key = 'id_or_key_example' # str | The PID or ID of the Test Run.
body = swagger_client.CommentResource() # CommentResource | The Comment's content

try: 
    # Adds a Comment to a Test Run
    api_response = api_instance.add_comment(project_id, id_or_key, body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TestrunApi->add_comment: %s\n" % e)

Parameters

Name Type Description Notes
project_id int ID of the project
id_or_key str The PID or ID of the Test Run.
body CommentResource The Comment's content

Return type

CommentResource

Authorization

Authorization

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

create

TestRunWithCustomFieldResource create(project_id, body, parent_id=parent_id, parent_type=parent_type)

Creates a Test Run

To create a Test Run under root or a container (Release, Test Cycle or Test Suite) qTest Manager version: 6+You can optionally specify a parent in the request parameter to create its test runs. The associated Test Case is specified in the request body

Example

from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.TestrunApi()
project_id = 789 # int | ID of the project
body = swagger_client.TestRunWithCustomFieldResource() # TestRunWithCustomFieldResource | The Test Run's properties and its associated Test Case
parent_id = 789 # int | ID of the container  Input 0 (zero) to get Test Runs directly under root (optional)
parent_type = 'parent_type_example' # str | Type of the container. Valid values include <em>root</em>, <em>release</em>, <em>test-cycle</em>, and <em>test-suite</em> (optional)

try: 
    # Creates a Test Run
    api_response = api_instance.create(project_id, body, parent_id=parent_id, parent_type=parent_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TestrunApi->create: %s\n" % e)

Parameters

Name Type Description Notes
project_id int ID of the project
body TestRunWithCustomFieldResource The Test Run's properties and its associated Test Case
parent_id int ID of the container Input 0 (zero) to get Test Runs directly under root [optional]
parent_type str Type of the container. Valid values include <em>root</em>, <em>release</em>, <em>test-cycle</em>, and <em>test-suite</em> [optional]

Return type

TestRunWithCustomFieldResource

Authorization

Authorization

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete

Message delete(project_id, test_run_id)

Deletes a Test Run

To delete a Test Run qTest Manager version: 6+

Example

from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.TestrunApi()
project_id = 789 # int | ID of the project
test_run_id = 789 # int | ID of the Test Run

try: 
    # Deletes a Test Run
    api_response = api_instance.delete(project_id, test_run_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TestrunApi->delete: %s\n" % e)

Parameters

Name Type Description Notes
project_id int ID of the project
test_run_id int ID of the Test Run

Return type

Message

Authorization

Authorization

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_comment

object delete_comment(project_id, id_or_key, comment_id)

Deletes a Comment of a Test Run

To delete a Comment of a Test Run qTest Manager version: 7.5+

Example

from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.TestrunApi()
project_id = 789 # int | ID of the project
id_or_key = 'id_or_key_example' # str | PID or ID of the Test Run.
comment_id = 789 # int | ID of the comment which you want to delete.

try: 
    # Deletes a Comment of a Test Run
    api_response = api_instance.delete_comment(project_id, id_or_key, comment_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TestrunApi->delete_comment: %s\n" % e)

Parameters

Name Type Description Notes
project_id int ID of the project
id_or_key str PID or ID of the Test Run.
comment_id int ID of the comment which you want to delete.

Return type

object

Authorization

Authorization

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get

TestRunWithCustomFieldResource get(project_id, test_run_id, expand=expand)

Gets a Test Run

To retrieve a Test Run qTest Manager version: 4+

Example

from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.TestrunApi()
project_id = 789 # int | ID of the project
test_run_id = 789 # int | ID of the Test Run.
expand = 'expand_example' # str | Valid values include:   i)<em>testcase</em> - to expand the associated Test Case in the response;   ii) <em>testcase.teststep</em> - to expand the associated Test Case and its Test Steps in the response (optional)

try: 
    # Gets a Test Run
    api_response = api_instance.get(project_id, test_run_id, expand=expand)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TestrunApi->get: %s\n" % e)

Parameters

Name Type Description Notes
project_id int ID of the project
test_run_id int ID of the Test Run.
expand str Valid values include: i)<em>testcase</em> - to expand the associated Test Case in the response; ii) <em>testcase.teststep</em> - to expand the associated Test Case and its Test Steps in the response [optional]

Return type

TestRunWithCustomFieldResource

Authorization

Authorization

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_comment

CommentResource get_comment(project_id, id_or_key, comment_id)

Gets a Comment from a Test Run

To retrieve a specific Comment from a Test Run qTest Manager version: 7.5+

Example

from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.TestrunApi()
project_id = 789 # int | ID of the project
id_or_key = 'id_or_key_example' # str | PID or ID of the Test Run.
comment_id = 789 # int | ID of the Comment

try: 
    # Gets a Comment from a Test Run
    api_response = api_instance.get_comment(project_id, id_or_key, comment_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TestrunApi->get_comment: %s\n" % e)

Parameters

Name Type Description Notes
project_id int ID of the project
id_or_key str PID or ID of the Test Run.
comment_id int ID of the Comment

Return type

CommentResource

Authorization

Authorization

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_comments

PagedResourceCommentResource get_comments(project_id, id_or_key)

Gets all Comments of a Test Run

To retrieve all Comments of a Test Run qTest Manager version: 7.5+

Example

from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.TestrunApi()
project_id = 789 # int | ID of the project
id_or_key = 'id_or_key_example' # str | PID or ID of the Test Run

try: 
    # Gets all Comments of a Test Run
    api_response = api_instance.get_comments(project_id, id_or_key)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TestrunApi->get_comments: %s\n" % e)

Parameters

Name Type Description Notes
project_id int ID of the project
id_or_key str PID or ID of the Test Run

Return type

PagedResourceCommentResource

Authorization

Authorization

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_of

TestRunListResource get_of(project_id, parent_id=parent_id, parent_type=parent_type, expand=expand, page=page, page_size=page_size)

Gets multiple Test Runs

To retrieve all Test Runs under root or under a container (Release, Test Cycle or Test Suite) qTest Manager version: 6+

Example

from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.TestrunApi()
project_id = 789 # int | ID of the project
parent_id = 789 # int | ID of the container (Release, Test Cycle or Test Suite)  Input 0 (zero) to retrieve Test Runs directly under root (optional)
parent_type = 'parent_type_example' # str | Type of the container. Valid values include <em>root</em>, <em>release</em>, <em>test-cycle</em> and <em>test-suite</em> (optional)
expand = 'expand_example' # str | Specify <em>expand=descendants</em> to include all Test Runs which are directly or indirectly under the container (optional)
page = 1 # int | By default the first page is returned but you can specify any page number to retrieve objects (optional) (default to 1)
page_size = 100 # int | The result is paginated. By the default, the number of objects in each page is 100 if this is omitted. You can specify your custom number (up to 999) in this parameter (optional) (default to 100)

try: 
    # Gets multiple Test Runs
    api_response = api_instance.get_of(project_id, parent_id=parent_id, parent_type=parent_type, expand=expand, page=page, page_size=page_size)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TestrunApi->get_of: %s\n" % e)

Parameters

Name Type Description Notes
project_id int ID of the project
parent_id int ID of the container (Release, Test Cycle or Test Suite) Input 0 (zero) to retrieve Test Runs directly under root [optional]
parent_type str Type of the container. Valid values include <em>root</em>, <em>release</em>, <em>test-cycle</em> and <em>test-suite</em> [optional]
expand str Specify <em>expand=descendants</em> to include all Test Runs which are directly or indirectly under the container [optional]
page int By default the first page is returned but you can specify any page number to retrieve objects [optional] [default to 1]
page_size int The result is paginated. By the default, the number of objects in each page is 100 if this is omitted. You can specify your custom number (up to 999) in this parameter [optional] [default to 100]

Return type

TestRunListResource

Authorization

Authorization

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_status_valuable

list[StatusResource] get_status_valuable(project_id)

Gets Test Run statuses

Gets Test Run statuses

Example

from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.TestrunApi()
project_id = 789 # int | ID of the project

try: 
    # Gets Test Run statuses
    api_response = api_instance.get_status_valuable(project_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TestrunApi->get_status_valuable: %s\n" % e)

Parameters

Name Type Description Notes
project_id int ID of the project

Return type

list[StatusResource]

Authorization

Authorization

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update

TestRunWithCustomFieldResource update(project_id, test_run_id, body, parent_id=parent_id, parent_type=parent_type)

Updates a Test Run

To update a Test Run or move it to another container qTest Manager version: 6+

Example

from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.TestrunApi()
project_id = 789 # int | ID of the project
test_run_id = 789 # int | ID of the Test Run.
body = swagger_client.TestRunWithCustomFieldResource() # TestRunWithCustomFieldResource | The Test Run's updated properties
parent_id = 789 # int | ID of the container (Release, Test Cycle or Test Suite)  Input 0 (zero) to move the test run to under root  <strong>Important:</strong> If you use the request parameters, the request body will be ignored. That means the test run is being moved but it will not be updated with the properties specify in the request body (optional)
parent_type = 'parent_type_example' # str | Type of the container. Valid values include <em>root</em>, <em>release</em>, <em>test-cycle</em> and <em>test-suite</em> (optional)

try: 
    # Updates a Test Run
    api_response = api_instance.update(project_id, test_run_id, body, parent_id=parent_id, parent_type=parent_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TestrunApi->update: %s\n" % e)

Parameters

Name Type Description Notes
project_id int ID of the project
test_run_id int ID of the Test Run.
body TestRunWithCustomFieldResource The Test Run's updated properties
parent_id int ID of the container (Release, Test Cycle or Test Suite) Input 0 (zero) to move the test run to under root <strong>Important:</strong> If you use the request parameters, the request body will be ignored. That means the test run is being moved but it will not be updated with the properties specify in the request body [optional]
parent_type str Type of the container. Valid values include <em>root</em>, <em>release</em>, <em>test-cycle</em> and <em>test-suite</em> [optional]

Return type

TestRunWithCustomFieldResource

Authorization

Authorization

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_comment

CommentResource update_comment(project_id, id_or_key, comment_id, body)

Updates a Comment of a Test Run

To update a Comment of a Test Run qTest Manager version: 7.5+

Example

from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.TestrunApi()
project_id = 789 # int | ID of the project
id_or_key = 'id_or_key_example' # str | PID or ID of the Test Run
comment_id = 789 # int | ID of the comment which you want to update.
body = swagger_client.CommentResource() # CommentResource | The Comment's updated content

try: 
    # Updates a Comment of a Test Run
    api_response = api_instance.update_comment(project_id, id_or_key, comment_id, body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TestrunApi->update_comment: %s\n" % e)

Parameters

Name Type Description Notes
project_id int ID of the project
id_or_key str PID or ID of the Test Run
comment_id int ID of the comment which you want to update.
body CommentResource The Comment's updated content

Return type

CommentResource

Authorization

Authorization

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]