Currently, we use Xray in Jira for test management, now we want to implement our automation as below:
- use Robotframework design script
- use Jenkins trigger automaion running
- return running result to xray and update execution status
- Create one test case, one execution, and add test case to execution, the default status as below:
- RF demo script:
Use offline way to install, download plugin here: xray-connector, and install plugin as below:
Then, we need to configure Xray plug-in to communicate with JIRA, navigate to Manage Jenkins > Configure System > Xray for Jira configuration.
- Just use RF command to run demo script, config as below:
- Retrun results to Xray, define in Post-build actioas - “Xray: Results Import Task”.
- Config task with below params:
- Import to Same Test Execution – When this option is checked, if you are importing multiple execution report files using a glob expression, the results will be imported to the same Test Execution - Execution Report File (file path with file name) – location and name of the Robot Framework tests output file. - Project Key – key of the JIRA project. This is a required parameter - Test Execution Key – JIRA issue key where results will be imported. - Test Plan Key – JIRA issue key of the Test Plan. - Test Environments – list of Environments (separated by “,”) where tests are executed.
- Run jenkins job
- Back to Jira Xray, the status update from TODO to PASS automatically
- Go to Execution detail page to view automaion detail result
Other things we could do:
- Create test exceution in xray automatically after automation running
- Even create test case after automation running