Robot Framework is an open-source automation framework that can be used for test automation. The integration with Zephyr Scale works through uploading a JUnit XML results file generated by the framework to Zephyr Scale. Once the file is uploaded to Zephyr Scale, it is possible to generate reports and leverage all the other capabilities that Zephyr Scale offers.
For more info on Robot framework, see here.
Writing Robot Framework tests
See below for an example of how to write test cases with Robot Framework and Zephyr Scale.
Input number 10 Press operator + Input number 1 Press clear Display should be empty Input number 1 Press operator + Input number 1 Press enter Result should be 3 Calculate two numbers should pass + 5 15 - 5 5 / 5 2 * 5 50
If any test case, prefixed with the test case key or not, is not found, an error will be returned when the results are uploaded to Zephyr Scale. In this case, if you intend to automatically create test cases that don’t exist previously, a flagcan be set when uploading test results to Zephyr Scale.
To summarize, the rules for matching a test method to a test case are:
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 withparameter followed by the xml file name. Here is an example:
Uploading results to Zephyr Scale
Once the Robot Framework tests have executed, the results can be uploaded to Zephyr Scale. There are two options for uploading test results:
Both options work the same way and can be uploaded using the same API endpoint: https://support.smartbear.com/zephyr-scale-cloud/api-docs/#operation/createJUnitExecutions.
Below, an example using curl of how to use the API endpoint for uploading one single file:
…and for uploading a zip file containing multiple XML files:
Note the query parameters on the URL. Thespecifies what project will be used to create the test cycle. The will create a test case using the Robot Framework test method name when no matching test case is found.
Is something missing? If you’d like to suggest an improvement to this integration, take a look at our Ideas Portal.
You can search for existing ideas or create your own. We review ideas regularly and will take them into account for future development.