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?
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.
@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?
I accept
It looks like you're new here. Sign in or register to get started.