Hi team,
https://docs.getxray.app/display/XRAYCLOUD/Importing+Tests+-+REST+v2
Document just mentions to how to upload fields action, data, result to each test step in Test. How about with field "attachment" in each test step, Do you support this? How to add an attachment/picture to each Test Step with XRAY REST API (XRAY CLOUD)?
Thanks,
Hoi
Hi @Hoi Tran
You need to use GraphQL (https://docs.getxray.app/display/XRAYCLOUD/GraphQL+API) and the mutation updateTestStep (https://xray.cloud.xpand-it.com/doc/graphql/updateteststep.doc.html).
As an input, you have the object UpdateStepInput where you can set the Attachment.
Any additional questions, please get in touch with Xray Support (http://xraysupport.xpand-it.com); we would gladly assist you.
Thank you.
Kind regards,
Rogério Paiva [Xray Support Team]
Hi @Rogério Paiva - Xray Xporter ,
Thanks for your response. However, I don't think that answers my question.
As your guideline, to use GraphQL, we need to use Insomnia with GUI.
In this case, I need some APIs (script) to automatically upload test steps (include data, image, attachment) to Xray TEST type. Does XRAY support this?
Thanks,
Hoi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Hoi Tran
No, the GraphQL does not require Insomnia, we suggest this tool to test the API, but it is not mandatory. You can make GraphQL requests similar to REST API requests inside code/scripting; it is only necessary to respect the GraphQL request format.
GraphQL still executes over an HTTP protocol, just like other API requests.
Thank you.
Kind regards,
Rogério Paiva [Xray Support Team]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Rogério Paiva - Xray Xporter Great! That what I am looking for. Thanks so much.
Do you have any examples for that, eg. for authentication like REST API?
I referred your link: http://xraysupport.xpand-it.com
but just see:
Do I need to raise a question to that page?
Thanks,
Hoi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Hoi Tran
That link is for the support service desk, and yes you may raise a question there.
Nevertheless, here are the documentation links to the authentication:
https://docs.getxray.app/display/XRAYCLOUD/GraphQL+API
Requests made to Xray's GraphQL API must also be authenticated using the same endpoint for REST API authentication.
Thank you.
Kind regards,
Rogério Paiva [Xray Support Team]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Rogério Paiva - Xray Xporter Thanks so much for your support.
I found the HTTP request form what you mentioned to:
https://graphql.org/learn/serving-over-http/
GET:
http://myapi/graphql?query={me{name}}
POST:
{
"query": "...",
"operationName": "...",
"variables": { "myVariable": "someValue", ... }
}
Thanks,
Hoi
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.