Skip to content

Latest commit

 

History

History
393 lines (285 loc) · 20.8 KB

TestRunsApi.md

File metadata and controls

393 lines (285 loc) · 20.8 KB

TricentisTmApi::TestRunsApi

All URIs are relative to https://api.ttm4j.tricentis.com

Method HTTP request Description
v1_projects_project_key_import_execution_junit_post POST /v1/projects/{project-key}/import/execution/junit Create test runs from junit xml string.
v1_projects_project_key_test_runs_post POST /v1/projects/{project-key}/test-runs Create test run(s).
v1_projects_project_key_test_runs_search_post POST /v1/projects/{project-key}/test-runs/search Read test run(s).
v1_projects_project_key_test_runs_test_run_key_delete DELETE /v1/projects/{project-key}/test-runs/{test-run-key} Delete test run(s).
v1_projects_project_key_test_runs_test_run_key_put PUT /v1/projects/{project-key}/test-runs/{test-run-key} Update test run(s).

v1_projects_project_key_import_execution_junit_post

<Array> v1_projects_project_key_import_execution_junit_post(project_key, opts)

Create test runs from junit xml string.

Import test run(s) (execution result) from JUnit XML string. #### Body: The body should be the XML content of the JUnit XML file. #### Query parameters: * version (optional): Specify the version name which the test runs will be under. * cycleName (optional): cycle name to specify. if not provided, it will take the it from the "name" attribute of the "testsuites" XML tag in case it exists. if nothing provided, it will generate a name like "Junit execution (current date)".

Examples

require 'time'
require 'tricentis_tm_api'
# setup authorization
TricentisTmApi.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['api_key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['api_key'] = 'Bearer'
end

api_instance = TricentisTmApi::TestRunsApi.new
project_key = 'project_key_example' # String | 
opts = {
  version: 'version_example', # String | version.
  cycle_name: 'cycle_name_example', # String | cycleName.
  v1_projects_project_key_import_execution_junit_post_request: TricentisTmApi::V1ProjectsProjectKeyImportExecutionJunitPostRequest.new # V1ProjectsProjectKeyImportExecutionJunitPostRequest | junitXml.
}

begin
  # Create test runs from junit xml string.
  result = api_instance.v1_projects_project_key_import_execution_junit_post(project_key, opts)
  p result
rescue TricentisTmApi::ApiError => e
  puts "Error when calling TestRunsApi->v1_projects_project_key_import_execution_junit_post: #{e}"
end

Using the v1_projects_project_key_import_execution_junit_post_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(<Array>, Integer, Hash)> v1_projects_project_key_import_execution_junit_post_with_http_info(project_key, opts)

begin
  # Create test runs from junit xml string.
  data, status_code, headers = api_instance.v1_projects_project_key_import_execution_junit_post_with_http_info(project_key, opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <Array<V1ProjectsProjectKeyTestRunsPost200ResponseInner>>
rescue TricentisTmApi::ApiError => e
  puts "Error when calling TestRunsApi->v1_projects_project_key_import_execution_junit_post_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
project_key String
version String version. [optional]
cycle_name String cycleName. [optional]
v1_projects_project_key_import_execution_junit_post_request V1ProjectsProjectKeyImportExecutionJunitPostRequest junitXml. [optional]

Return type

Array<V1ProjectsProjectKeyTestRunsPost200ResponseInner>

Authorization

api_key

HTTP request headers

  • Content-Type: application/xml, application/json
  • Accept: application/json

v1_projects_project_key_test_runs_post

<Array> v1_projects_project_key_test_runs_post(project_key, opts)

Create test run(s).

Create or import test run(s). ##### Note: Release versions are managed in Jira. #### Body fields: * version (optional): Specify the version name which the test runs will be under. If version won't be provided OR version will be equal to unversioned, the test runs will be created under unversioned. (creating and editing of releases (versions) are managed in Jira). * cycleName (optional): Specify the cycle name which the test runs will be under. * folderPath (optional): Specify the folder path where you want to save the test run. A path is a string of concatenated parts separated by a slash "/". If you don't specify a folder path, the test run will be under the cycle. * includeAttachments (optional): Specify if to include attachments (default value: false). Cycle must be provided here or under test runs (for each test runs). * testRuns (mandatory): Provide a list of test runs, with each test having the following fields: * testCaseKey (mandatory): test case key that the test run will be linked to. * status (mandatory): the status of the test run. Status of test runs is defined in JIRA under the admin page. * name (optional): name of the test run. * description (optional): description of the test run. * priority (mandatory): priority of the test run ("Highes","Low",etc..). * testCategory (mandatory): The test run category of the test run ("Functional" or "NonFunctional"). * testType (mandatory): the test type of the test run (Manual, Automated). * cycleName (optional): specify the cycle name which the test runs will be under. * folder (optional): Specify the folder path where you want to save the test run. A path is a string of concatenated parts separated by a slash "/". If you don't specify a folder path, the test run will be under the cycle. If you do not specify the folder in this field, the request uses the folder specified at the root level. Cycle must be provided here or above testRuns in cycleName. * assignee (optional): the username or email which the test run will be assigned to. * executedBy (optional): the username or email which the test run is executed by. * automation (optional): the automation content of the test run. In case TestType is Manual, Automation will be ignore (Manual test run can't contain automation content). * name (optional): the name of automation tool. * id (optional): the id of the test run in the automation tool. * content (mandatory): the test run automation content. * plannedStartDate (optional): the test run planned start date. * plannedEndDate (optional): the test run planned end date. * components (optional): the test runs components. * labels (optional): the test runs labels. * steps (optional): list of steps of the test run. In case TestType is Automated, and Steps will be provided (Test Run will contain Steps and Automation). * status (mandatory): the status of the test run step. * actualResult (optional): the actual result of the steps. * comment (optional): the test run step's comment. * data (optional): the test run step's data. * description (optional): the test run step's description. * expectedResult (optional): the test run step's expectedResult. * fields (optional): list of fields of the test run. In case the field is List type (like Environments) allowedValueName must be provided, otherwise (like execution timer) 'value' must be provided. * schemeName (mandatory): the scheme name of the field (for example Execution Timer or Environments). * allowedValueName (optional): the allowed value of the scheme (for example Development). * value (optional): the value of the scheme (for example 130).

Examples

require 'time'
require 'tricentis_tm_api'
# setup authorization
TricentisTmApi.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['api_key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['api_key'] = 'Bearer'
end

api_instance = TricentisTmApi::TestRunsApi.new
project_key = 'project_key_example' # String | 
opts = {
  v1_projects_project_key_test_runs_post_request: TricentisTmApi::V1ProjectsProjectKeyTestRunsPostRequest.new # V1ProjectsProjectKeyTestRunsPostRequest | testRuns.
}

begin
  # Create test run(s).
  result = api_instance.v1_projects_project_key_test_runs_post(project_key, opts)
  p result
rescue TricentisTmApi::ApiError => e
  puts "Error when calling TestRunsApi->v1_projects_project_key_test_runs_post: #{e}"
end

Using the v1_projects_project_key_test_runs_post_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(<Array>, Integer, Hash)> v1_projects_project_key_test_runs_post_with_http_info(project_key, opts)

begin
  # Create test run(s).
  data, status_code, headers = api_instance.v1_projects_project_key_test_runs_post_with_http_info(project_key, opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <Array<V1ProjectsProjectKeyTestRunsPost200ResponseInner>>
rescue TricentisTmApi::ApiError => e
  puts "Error when calling TestRunsApi->v1_projects_project_key_test_runs_post_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
project_key String
v1_projects_project_key_test_runs_post_request V1ProjectsProjectKeyTestRunsPostRequest testRuns. [optional]

Return type

Array<V1ProjectsProjectKeyTestRunsPost200ResponseInner>

Authorization

api_key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

v1_projects_project_key_test_runs_search_post

v1_projects_project_key_test_runs_search_post(project_key, opts)

Read test run(s).

Get or retrieve information from test run(s). #### Body fields: * cycles (optional): Specify the cycles to filter by the result. * keys (optional): Specify the test runs keys to filter by the result. * expand (optional): Specify which fields will return additionaly for each Test Run. Allowed values: "Steps" - The test run steps.

Examples

require 'time'
require 'tricentis_tm_api'
# setup authorization
TricentisTmApi.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['api_key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['api_key'] = 'Bearer'
end

api_instance = TricentisTmApi::TestRunsApi.new
project_key = 'project_key_example' # String | 
opts = {
  offset: TODO, # Integer | Numeric value that determines that the result list will start from result #N (zero based)
  limit: TODO, # Integer | Numeric value that determines that maximum N results will be returned
  v1_projects_project_key_test_runs_search_post_request: TricentisTmApi::V1ProjectsProjectKeyTestRunsSearchPostRequest.new # V1ProjectsProjectKeyTestRunsSearchPostRequest | Test Runs Search filters.
}

begin
  # Read test run(s).
  result = api_instance.v1_projects_project_key_test_runs_search_post(project_key, opts)
  p result
rescue TricentisTmApi::ApiError => e
  puts "Error when calling TestRunsApi->v1_projects_project_key_test_runs_search_post: #{e}"
end

Using the v1_projects_project_key_test_runs_search_post_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> v1_projects_project_key_test_runs_search_post_with_http_info(project_key, opts)

begin
  # Read test run(s).
  data, status_code, headers = api_instance.v1_projects_project_key_test_runs_search_post_with_http_info(project_key, opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <V1ProjectsProjectKeyTestRunsSearchPost200Response>
rescue TricentisTmApi::ApiError => e
  puts "Error when calling TestRunsApi->v1_projects_project_key_test_runs_search_post_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
project_key String
offset Integer Numeric value that determines that the result list will start from result #N (zero based) [optional]
limit Integer Numeric value that determines that maximum N results will be returned [optional]
v1_projects_project_key_test_runs_search_post_request V1ProjectsProjectKeyTestRunsSearchPostRequest Test Runs Search filters. [optional]

Return type

V1ProjectsProjectKeyTestRunsSearchPost200Response

Authorization

api_key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

v1_projects_project_key_test_runs_test_run_key_delete

v1_projects_project_key_test_runs_test_run_key_delete(test_run_key, project_key)

Delete test run(s).

Delete existing test run(s).

Examples

require 'time'
require 'tricentis_tm_api'
# setup authorization
TricentisTmApi.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['api_key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['api_key'] = 'Bearer'
end

api_instance = TricentisTmApi::TestRunsApi.new
test_run_key = 'test_run_key_example' # String | Test Run Key.
project_key = 'project_key_example' # String | 

begin
  # Delete test run(s).
  api_instance.v1_projects_project_key_test_runs_test_run_key_delete(test_run_key, project_key)
rescue TricentisTmApi::ApiError => e
  puts "Error when calling TestRunsApi->v1_projects_project_key_test_runs_test_run_key_delete: #{e}"
end

Using the v1_projects_project_key_test_runs_test_run_key_delete_with_http_info variant

This returns an Array which contains the response data (nil in this case), status code and headers.

<Array(nil, Integer, Hash)> v1_projects_project_key_test_runs_test_run_key_delete_with_http_info(test_run_key, project_key)

begin
  # Delete test run(s).
  data, status_code, headers = api_instance.v1_projects_project_key_test_runs_test_run_key_delete_with_http_info(test_run_key, project_key)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => nil
rescue TricentisTmApi::ApiError => e
  puts "Error when calling TestRunsApi->v1_projects_project_key_test_runs_test_run_key_delete_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
test_run_key String Test Run Key.
project_key String

Return type

nil (empty response body)

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

v1_projects_project_key_test_runs_test_run_key_put

v1_projects_project_key_test_runs_test_run_key_put(test_run_key, project_key, opts)

Update test run(s).

Update an existing test run. ##### Note: Any values you enter will override existing values in the test run. #### Body fields: * testCategory (optional): The test run category of the test run ("Functional" or "NonFunctional"). * executedBy (optional): the username or email which the test run is executed by. * assignee (optional): the username or email which the test run will be assigned to. * priority (optional): priority of the test run ("Highes","Low",etc..). * status (optional): the status of the test run. Status of test runs is defined in JIRA under the admin page. Mandatory field. * plannedStartDate (optional): the test run planned start date. * plannedEndDate (optional): the test run planned end date. * cycleId (optional): specify the cycle Id which the test runs will be under. * folderPath (optional): Specify the folder path where you want to move the test run. A path is a string of concatenated parts separated by a slash "/". If you don't specify a folder path, the test run will be under the cycle. * components (optional): the test runs components. * labels (optional): the test runs labels. * steps (optional): list of steps of the test run. In case TestType is Automated, Steps will be ignore (Automated test run can't contain steps). * status (mandatory): the status of the test run step. * actualResult (optional): the actual result of the steps. * comment (optional): the test run step's comment. * data (optional): the test run step's data. * description (optional): the test run step's description. * expectedResult (optional): the test run step's expectedResult. * fields (optional): list of fields of the test run. In case the field is List type (like Environments) allowedValueName must be provided, otherwise (like execution timer) 'value' must be provided. * schemeName (mandatory): the scheme name of the field (for example Execution Timer or Environments). * allowedValueName (optional): the allowed value of the scheme (for example Development). * value (optional): the value of the scheme (for example 130).

Examples

require 'time'
require 'tricentis_tm_api'
# setup authorization
TricentisTmApi.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['api_key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['api_key'] = 'Bearer'
end

api_instance = TricentisTmApi::TestRunsApi.new
test_run_key = 'test_run_key_example' # String | Test Run Key.
project_key = 'project_key_example' # String | 
opts = {
  v1_projects_project_key_test_runs_test_run_key_put_request: TricentisTmApi::V1ProjectsProjectKeyTestRunsTestRunKeyPutRequest.new # V1ProjectsProjectKeyTestRunsTestRunKeyPutRequest | Patch document.
}

begin
  # Update test run(s).
  api_instance.v1_projects_project_key_test_runs_test_run_key_put(test_run_key, project_key, opts)
rescue TricentisTmApi::ApiError => e
  puts "Error when calling TestRunsApi->v1_projects_project_key_test_runs_test_run_key_put: #{e}"
end

Using the v1_projects_project_key_test_runs_test_run_key_put_with_http_info variant

This returns an Array which contains the response data (nil in this case), status code and headers.

<Array(nil, Integer, Hash)> v1_projects_project_key_test_runs_test_run_key_put_with_http_info(test_run_key, project_key, opts)

begin
  # Update test run(s).
  data, status_code, headers = api_instance.v1_projects_project_key_test_runs_test_run_key_put_with_http_info(test_run_key, project_key, opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => nil
rescue TricentisTmApi::ApiError => e
  puts "Error when calling TestRunsApi->v1_projects_project_key_test_runs_test_run_key_put_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
test_run_key String Test Run Key.
project_key String
v1_projects_project_key_test_runs_test_run_key_put_request V1ProjectsProjectKeyTestRunsTestRunKeyPutRequest Patch document. [optional]

Return type

nil (empty response body)

Authorization

api_key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json