Need help to add test cases to a test set using API.

Luiza Silva May 5, 2022

Hi, I'm working with Xray Cloud and I need to add test cases to a test set by API. I noticed that these are the only APIs available for Xray Cloud: 

https://docs.getxray.app/display/XRAYCLOUD/Version+1

Then I tried to use this API:

https://docs.getxray.app/display/XRAY/Test+Sets+-+REST

curl -H "Content-Type: application/json" -X POST -u myuser@mycompany.com:mytoken --data @payload.json https://mycompanybaseurl/rest/raven/1.0/api/testset/mytestsetkey/test

But this is the repose that I'm getting:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<status>
        <status-code>404</status-code>
        <message>null for uri: https://checkmarx.atlassian.net/rest/api/3/testset/QAPT-153/test</message>
</status>

There is a way to do that for Xray Cloud?

 

1 answer

1 accepted

0 votes
Answer accepted
Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 5, 2022

Hi @Luiza Silva -- welcome to the Atlassian Community,

as it seems there is no native implementation in Xray Cloud API. I found a post that looks similar to yours:
https://community.atlassian.com/t5/Marketplace-Apps-Integrations/How-to-get-tests-and-testsets-in-XRAY-jira-cloud-setup/qaq-p/1430156

Please check the answer from XRAY there if this might help.

Best
Stefan

Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 11, 2022

Hi @Luiza Silva 

Any feedback? Is your question answered?

Best
Stefan

Luiza Silva May 11, 2022

Hi Stefan, thanks for your answer! I'm working on it, but it looks like it works :) 

Thanks again!

Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 11, 2022

In case your question was answered please consider to click the accept button in order to mark this case solved and make it easier for other users to find solutions to similar problems.

Best
Stefan

Suggest an answer

Log in or Sign up to answer