Robot Framework Integration
Starting October 11, 2024 (Zephyr Enterprise 8.2), the Zephyr Enterprise documentation moved from its current location on Atlassian to a dedicated, standalone Zephyr Enterprise documentation page. Please see: Robot Framework Integration | Zephyr Enterprise Documentation
Robot Framework is an open-source test automation framework. The integration with Zephyr Enterprise works by sending a JUnit XML results file generated by the framework via API/vortex to Zephyr Enterprise.
For more info on the Robot framework, see here.
Writing Robot Framework tests
See below for an example of writing test cases with Robot Framework and Zephyr Enterprise.
*** Test Cases ***
# will match Zephyr Enterprise test case named Calculator.User can clear the display
User can clear the display
Input number 10
Press operator +
Input number 1
Press clear
Display should be empty
Note the comments above each method describing how they map to existing test cases within Zephyr Enterprise.
Configuring Robot Framework to output JUnit XML results file
No configuration is required beforehand. In order to instruct Robot Framework to generate the JUnit XML results file, all that is required is to execute the tests with -x
parameter followed by the xml file name. Here is an example:
robot -x junitresult.xml mytest.robot
Uploading results to Zephyr Enterprise
Once the Robot Framework tests have been executed, the results can be uploaded to Zephyr Enterprise.
Using API we can upload the JUnit XML results file generated by Robot Framework.
Using Vortex Suite Automation containing JUnit XML results file generated by Robot Framework.
Using Vortex FolderWatcher file containing multiple JUnit XML results files generated by Robot Framework.
If the XML file Upload does not work, we could create a Custom template for the Robot Framework depending on the Junit XML output using the API
Example Body of the Custom Template:-
Example 1:-
{
"name": "robot",
"jsonTemplate": "[{\"statuses\":[{\"statusId\":\"2\",\"attachmentText\":\"Name: ${robot.suite.test:name} \\nResult: ${robot.suite.test.status:status} \\nMessage: ${robot.suite.test.status}\",\"status\":\"${robot.suite.test.status:status}\",\"statusString\":\"FAIL\"},{\"statusId\":\"1\",\"attachmentText\":\"Classname: ${robot.suite:name} \\nTestcaseName: ${robot.suite.test:name} \\nResult: ${robot.suite.test.status:status}\",\"default\":true}],\"skipTestcaseNames\":\"\",\"packageName\":\"${robot.suite:name}\",\"testcase\":{\"name\":\"${robot.suite.test:name}\"},\"strict\":true}]"
}
Example 2:-
Starting Release 8.2, Zephyr Enterprise documentation is moving from its current location on Atlassian to a dedicated, standalone Zephyr Enterprise Documentation page. https://support.smartbear.com/zephyr-enterprise/docs/en/welcome-to-zephyr-enterprise.html