I'm looking to automate tests for my project using Xray, Robot Framework With python , and GitLab, but I'm unsure of how to proceed. Could someone provide guidance on how to set up the automation workflow?
Know how to automate test using this tools
I'm looking to automate tests for my project using Xray, Robot Framework With python , and GitLab, but I'm unsure of how to proceed. Could someone provide guidance on how to set up the automation workflow?
Know how to automate test using this tools
Copyright © 2021 Jogjafile Inc.
The overall flow would be something like this, assuming you're adopting ATDD:
If you're using Xray on Jira Datacenter, you can see here a detailed tutorial showcasing some automated tests implemented in Robot Framework and then the integration with Xray; there's a GibHub repo with the sample code used.
So, and focusing on the essential, you would:
robot ...), which will produce and output.xml reportAs an example, to submit the RF report to Xray on Jira Datacenter, you can make a POST request using something like this (assuming you have
curltool):If you're using Xray on Jira Cloud, there's a somehow similar tutorial.
To setup this on Gitlab, you should create a
.gitlab-ci.ymlfile in your repository.Don't forget to add the environment variables on your GitLab CI/CD configuration, under the Pipeline area in Gitlab's UI.
When you run this, either manually or because of a commit, the workflow will be run on Gitlab, and there you can see the information on the Test Execution issue created on Xray; in the screenshot it shows "CALC-408".
If you go to your Jira/Xray instance, you'll be able to see the new Test Execution along with the results.
Note: Xray may support RF up to version 6.x; not the latest RF 7.0.
============ ============ ============ ============
If you were using CircleCI as CI/CD tool, the process would be quite similar; I'll share it as I started by implementing it using CircleCI initially to prepare the answer for you.
To setup this on CircleCI, you should create a
.circleci/config.ymlfile in your repository, and add something like the following (dont forget to create some environment variables in your CircleCI project configuration):When you run this, either manually or because of a commit, the workflow will be run on CircleCI, and there you can see the information on the Test Execution issue created on Xray; in the screenshot it shows "CALC-395", even though CircleCI redacted the project key (i.e. "CALC").
If you go to your Jira/Xray instance, you'll be able to see the new Test Execution along with the results.