Our documentation site has been updated to AIO Tests Knowledge Base
Robot
AIO Tests simplifies the reporting of Robot results by facilitating the import of output.xml, the output file generated during robot test execution. This integration relieves developers from manually entering test cases into AIO Tests. Instead, they can create robot cases, and AIO Tests will automatically import and generate corresponding cases, incorporating their execution results.
This article outlines the process of importing Robot’s XML results, allowing for mapping existing cases in AIO Tests or generating new cases when none exist.
Robot
Robot is a Python-based testing framework that supports. It is designed for acceptance test-driven development (ATDD), behavior-driven development (BDD), and robotic process automation (RPA).
Robot Reporting
Robot Framework furnishes three output files: a log file, a report file, and an output file. The output file captures the test execution results in a machine-readable XML format. When tests are executed, the default name for the output file is "output.xml." This XML file is utilized to import test cases from Robot to AIO Tests.
Sample Robot XML Report
Status Mapping Robot → AIO Tests
Robot | AIO Tests |
---|---|
PASS | PASSED |
FAIL | FAILED |
SKIP | NOT RUN |
NOT RUN | NOT RUN |
Mapping automated Robot Tests to AIO Tests
AIO Tests seamlessly integrates the Robot Framework for the import feature without the need for any additional dependencies or coding.
Users can relate their cases with existing AIO cases by tagging the test cases with AIO case keys.
Standalone Test Case key
Tags can be used to specify the AIO Tests key. In the example below, “SCRUM-TC-408” has been tagged to a robot test case. This key maps the robot case to an existing case in AIO Tests.
Valid Login
[Tags] SCRUM-TC-408
Open Browser To Login Page
Input Username demo
Input Password mode
Submit Credentials
Welcome Page Should Be Open
[Teardown] Close Browser
Automation Key
AIO Tests will not generate a new case if a Robot case lacks an AIO case key but has already been imported once. Instead, it will utilize the existing case by referencing the automation key. The automation key is derived from the source value and the test case name from the results file.
If the source is changed, the automation key will no longer map to the same case. If this is the case, the case can be marked with the AIO Case key, so that the association doesn’t break.
Mapping an automated case to multiple manual tests
A single test case in Robot can also be mapped to multiple cases in AIO Tests. In the example below, the results of the Robot case would be mapped into “SCRUM-TC-408” and “SCRUM-TC-409”.
Valid Login
[Tags] SCRUM-TC-408 SCRUM-TC-409
Open Browser To Login Page
Input Username demo
Input Password mode
Submit Credentials
Welcome Page Should Be Open
[Teardown] Close Browser
New case creation
Robot test cases that are not tagged by the AIO case keys are also imported. In this case, the test name becomes the case name in AIO tests, and an automation key is generated from the source value and the test case name. The following table shows the mapping of robot test case to Aio Test case
Robot Test Case | AIO Test Case |
---|---|
Test case name | Case Title |
Documentation tag inside the test case | Description |
Tag annotated with @JREQ | Jira requirements |
Mapping Jira requirements
This integration also supports the mapping of Jira requirements to cases. This is achieved by tagging a test case with a Jira requirement key and a prefix @JREQ. In the examples below, test cases get created with the tagged Jira requirements.
Mapping a single Jira requirement
Mapping multiple Jira requirements
Mapping a case to a folder
Users have the option to designate a default folder for newly created cases. They can also define a mapping between a case and a folder by simply adding a tag starting with the prefix @AIO-FOLDER-
and mentioning the folder hierarchy. Folder hierarchy can be separated using /
Example - @AIO-FOLDER-Reports/Audit log
Note- This functionality is applicable only:
if a new case is generated through the import process
if the folder structure specified in the tag already exists.
Additionally, if configured, this will supersede the default folder setting.
Mapping using the default folder option
Mapping each case using tags
Percolating changes from automated tests to AIO tests
Force Update field
Enabling the force update of cases entails modifying the case title, description, steps, and Jira requirements for the respective test cases.
Adding or Updating Case Description
This integration also lets users map the test case level documentation to the case description. In the example below, the contents of the documentation tag are mapped to the case description of the case “SCRUM-TC-408”.
Importing Results
Post execution of a Robot file, the output.xml file can be uploaded either via
Import Results - REST API - REST API call using multipart form-data to upload file
Import Results- Cycle Tab - Importing results file from the Cycles tab of the AIO Tests app
Please follow the above links to continue to import results using either of the options.