Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagepy
headers = {'Authorization': 'AioAuth <Your API Token>'}

1. Get Cycle Details [Swagger]

Get Cycle Details and other Cycle information APIs can be used to get details of existing cycles details, run summary and cycle folder structures.

Code Block
languagepy
import requests


def _url(path):
    return 'https://tcms.aioreportsaiojiraapps.com/aio-tcms/api/v1' + path

projectKey = "ATSMPL"
cycleKey = "ATSMPL-CY-Adhoc"
headers = {'Authorization': 'AioAuth <Your API Token>'}
response = requests.get(_url('/project/{}/testcycle/{}/detail'.format(projectKey, cycleKey)),
                        headers=headers)

print(response.text)

2. Create Cycle [Swagger]

Depending on your organization’s process/needs, automation execution results can be captured in AIO Tests in two ways.

...

3. Mark execution results [Swagger]

The below sample creates a new cycle and reports the execution results and duration of run of your test cases.
The sample methods can be added to your test framework’s listeners or hooks which execute either after a case finishes or after execution finishes. [ege.g. IInvokedMethodListener in TestNG / TestCaseFinished event in Cucumber / RunListener/TestExecutionListener in JUnit]
These case runs show up with Execution Mode as Automated in AIO Tests.

...

4. Import Execution Results from JUnit/TestNG xml files [Swagger]

As a post execution step, AIO Tests currently supports the JUnit XML Report format and the TestNG report format.
To import results from either of these formats to AIO Tests, the Import Results API can be used in post execution listeners/hooks.

Code Block
languagepy
import requests


def _url(path):
    return 'https://tcms.aioreportsaiojiraapps.com/aio-tcms/api/v1' + path


projectKey = "ATSMPL"
headers = {'Authorization': 'AioAuth <Your API Token>'}
files = {'file':  open("testng-results.xml", 'rb')}
data = {'addCaseToCycle': True, 'createNewRun': True}
response = requests.post(_url('/project/{}/testcycle/{}/import/results?type=JUnit'.format(projectKey,cycleKey)),
                         files=files, data=data,headers=headers)

print(response.text)

...

Filter by label (Content by label)
page
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@833
showSpacefalse
sortmodified
showSpacetypefalsepage
reversetruetype
labelskb-how-to-article
cqllabel in ( "automation" , "junit" , "api" , "apitoken" ) and type = "page" and space = "ATDoc"labelskb-how-to-article
Page Properties
hiddentrue

Related issues