Using the Integration
The integration consists of a Python module called robot_spira_integration.py
that is executed after your Robot Framework tests are executed. This module will read the results of the Robot Framework output.xml
report file and send the results to Spira, mapping each Robot Framework test case to a matching Spira test case. The integration uses a simple configuration file to connect to Spira:
[credentials]
# Following are required
url = https://myserver/spiraservice.net
username = fredbloggs
token = {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXXX}
project_id = 1
# Following are optional:
release_id = 5
test_set_id = 1
Once that is in place, you simply tag the various Robot Framework test cases with their corresponding Spira test case IDs:
Simple Test Case
[Documentation] Shows some assertion keywords
[Tags] TC:2
Should Be Title Case Robot Framework
Should Be Equal Text123 Text123
Should Be True 5 + 5 == 10
Once that is done, you should see something like:
Sending test results to Spira at URL 'https://myserver/spiraservice.net'.
Successfully reported 4 test cases to Spira.
If there are any errors or warnings, they will be displayed instead.
Viewing the Results in Spira
Finally, to view the results in Spira, you can go to the Test Runs tab to see the list of test runs:
If you click on one of the passed test runs, it will display the name of the test case from Robot Framework, together with the status (pass), the test set, release and actual duration:
If you scroll down to the Console Output section, it displays the full name and path of the Robot Framework test case as well as the contents of the Documentation attribute and any messages.
If you click on one of the failed test runs, it will display the name of the test case from Robot Framework, together with the status (fail), the test set, release and actual duration:
If you scroll down to the Console Output section, it displays the full name and path of the Robot Framework test case as well as the contents of the Documentation attribute and in this case, the details of what caused the test to fail:
How Do I Get The Integration?
The latest versions of the plugin can be downloaded from the Python Package Index, and the source code can be found in our public GitHub repository:
If you'd like to make changes, please feel free to fork the repository.