Using automation to add tests to a given test set

M_K_ March 31, 2023

Dear community,

does anybody have an idea how I can automate to add tests to a xray testset? The automation rule should start scheduled (e.g. every 1 day) and then add existing tests to be found via a JQL query to a given fixed testset.

Thank your for your support and ideas.

1 answer

0 votes
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.
March 31, 2023

Hi @M_K_ - welcome to the community,

it´s possible with calling a "send webrequest" action within your automation rule that will then calls the GraphQL-API of XRAY.

There is a method to either addTestsToTestSet (see the link below):

https://xray.cloud.getxray.app/doc/graphql/addteststotestset.doc.html

 

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.
April 6, 2023

@M_K_ 

Could you give it a shot?

Best
Stefan

M_K_ April 18, 2023

Dear Stefan,

thank you for your proposed solution and sorry for my late reply, but I wasn't available for some days.

Unfortunately the approach doesn't totally fit to my problem. I'm hoping to find a solution that doesn't go via APIs. I rather simply want to use a Jira integrated automation rule that runs e.g. once a night and adds all newly added tests (based on affected systems and components) to a given fixed test set. Only if there is no way at all to solve it Jira-internally I would try to solve this via an external API solution. In my case most likely a Python script.

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.
April 18, 2023

Hi @M_K_ 

some things I would like to add here:

1. the action of adding tests to test sets is not a native jira action. Therefore APIs are provided by the vendors to do those things

2. The solution I proposed is mainly processed by an automation rule in the internal Automation for Jira. Nevertheless this automation would have a component (calle "send webrequest" action) that fires an api call (as there is no other action in the jira automation rule that could do this natively).

Best
Stefan

Suggest an answer

Log in or Sign up to answer