I need help with a small project i am running.
I have to see if there is a test on a certain date or not. But there should be a version for each day (e.g. November 9, 2020). That’s what I’m supposed to find out with the help of a REST call.
If it is not available, it must be created using a REST call.
Input data:
Date (e.g. November 9th, 2020)
HI @Dominik Rüther ,
Regards
Sérgio
1. We have tests every day, and i have to see, if there is already an execution created for a certain day or not. if not, an execution should be created.
2. Since we have tests evry day, during a week, there must also be an execution for each day.
I hope it is a bit more clear now.
Regards
Dominik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
perhaps you can try to search for the Test Executions.
You can either use Jira's REST API and JQL for that or use Xray's GraphQL API, which in turn can also receive a JQL.
https://xray.cloud.xpand-it.com/doc/graphql/gettestexecutions.doc.html
In the JQL you can search for those issues but the exact query will depend on you you say that the Test Execution is aimed for a given day.
Sérgio
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
perhaps you can try to search for the Test Executions.
You can either use Jira's REST API and JQL for that or use Xray's GraphQL API, which in turn can also receive a JQL.
In the JQL you can search for those issues but the exact query will depend on you you say that the Test Execution is aimed for a given day.
Sérgio
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Sergio,
I found the Problem. Here is the Rest call:
/rest/raven/1.0/api/testplan/{testplankey}/testexecution
Thanks for your help.
Dominik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Gotcha, so you have a Test Plan and you wanted to find out the Test Executions of that Test Plan :)
All clear now? Do you need anything else?
Regards
Sérgio
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
maybe a little thing, how can I create a test and give it different attributes such as the status?
So far I have had this order, but I am not getting anywhere.
POST /rest/raven/1.0/api/testexec/{testExecKey}/test
Thank you in advance
Dominik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, that endpoint...
POST /rest/raven/1.0/api/testexec/{testExecKey}/test
... is to associate existing Tests to an existing Test Execution; it's not to create Tests.
More details here: https://docs.getxray.app/display/XRAY/Test+Executions+-+REST
However, that endpoint is for Xray on-premises (i.e. Jira server/Data Center).. and you are using Xray on Jira Cloud.. or not really?
Anyway, if you aim to *create* Tests, you have to use Jira's REST API for that and when doing so, you can define the values for standard fields your issues have.
The following open-source repository can be useful as it provides concrete examples of usage of Xray's APIs (for Jira server and for Jira Cloud) and also for Jira's REST API.
https://github.com/Xray-App/xray-postman-collections
Hope it helps.
Regards
Sérgio
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Sergio,
thanks again, i figured it out.
But i have two more questions. I want to find out, with the helf of a REST call, which test cases are in a specific test plan.
I also want to find out, how i ca make a REST cal to attach test cases to a test run.
Would be very nice if you could help me again.
Kind regards
Dominik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Dominik Rüther ,
I'm not sure if you're using Xray Cloud or Xray on jira premises? Can you please clarify?
Nevertheless, the Postman collections that I shared above provide examples for it.
Regards,
Sérgio
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you, this has been very helpful. I have looked though the collection again and found some calls i need. Unfortunately, I couldn´t find the above-mentioned calls. Do you have an Idea?
I am using Xray on a lokal Server.
Regards,
Dominik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Dominik Rüther ,
on your questions:
I want to find out, with the helf of a REST call, which test cases are in a specific test plan.
I also want to find out, how i can make a REST call to attach test cases to a test run.
Regards,
Sergio
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.