X-Ray: use Jira automation rule to update story status triggered by test execution/ test run status

katharina.rott January 31, 2022

In our story workflow status we have some status values that reflect the stage of testing.

When it comes to testing the story, we create a test execution for each story containing all the tests associated with the story.

We now like to automate the transition of the story workflow status triggered by the test run status of the linked test issues.

So e.g. we have the story status "Ready for functional testing". Once the test execution has been created for the story and the test status of the test issues = To Do, the story status should be updated to "In functional testing".
Once the test run status for the execution is "Passed", the story status should be updated to "Story accepted - Sprint Review".

I didn't find any way to access any x-ray related field / status values in the Jira Automation Builder. Even not when using JQL filters, as they are quite limited for Jira / X-Ray Cloud.

Could you please let me know if my requirement can be achieved with the current tools X-Ray/ Jira Cloud offers? Thanks a lot in advance!

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.
February 5, 2022

hi @katharina.rott 

from my point of view this could through "issue transition" trigger, condition "issue type = Sub TestExecution".

It would be helpful if the execution is created as a Sub-TestExecution in the story. This will help create a parent branch and transition the story to another status (see screenshot).


Hope I got your instruction right and this was helpful.

 

(btw: as your name seems German or Austrian you could also answer me in German :) I am from Austria)

image.png

katharina.rott February 7, 2022

Hallo @Stefan Salzl , vielen Dank für deine Antwort! Wir verwenden den Issue Type Test Execution (und nicht Sub-Test Execution) da wir in einem team-managed Projekt arbeiten - gibt es unter den Voraussetzungen auch eine Möglichkeit? :) 

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.
February 7, 2022

Hi @katharina.rott ,
Da gibt es die Möglichkeit, mit Links zu arbeiten. Setzt jedoch voraus, dass die TestExecutions richtig und immer gleich in den Stories verlinkt werden. Auf linkedIssues kann die automation rule reagieren.

XRAY-interne values (zB passed oder failed) können mittels der internen automation oder JQL nicht abgefangen werden. Jedoch hat ja auch das Issue "TestExecution" die ganz normalen status wie alle Jira issues. Den Status der einzelnen Testruns in der Testexecution muss ja auch von jemandem gesetzt werden. Im Zuge dessen kann der Status des issues "TestExecution" dann auch gesetzt werden, woraufhin eine automation rule dann schon reagieren kann.

Hoffe das war verständlich und hilfreich erklärt. Gib Bescheid, falls etwas unklar ist bzw. es noch Fragen gibt

 

LG
Stefan

katharina.rott February 9, 2022

Hi @Stefan Salzl , 

vielen Dank für die Erklärung! Sprich mit linkedIssues würde es nur funktionieren, wenn neben dem Setzen des Test Run Status (Passed, Failed) auch der Workflow Status der TestExecution manuell gesetzt wird, richtig? 

Viele Grüße

Katharina

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.
February 9, 2022

Hi @katharina.rott ,

Ja genau. Auf den Workflow-/Issue-Status des linkedIssues kann eine Automation-Rule dann getriggered werden. 
(So weit ich gelesen habe kann in Jira Server/DC der Workflow-Status über das Execution-Result geändert werden, aber bei der Cloud-Version funktioniert das meines Wissens nicht)

 

LG

Stefan

Adam Ziecik
Contributor
April 6, 2023

@katharina.rott and @Stefan Salzl I am trying to achieve a similar thing. Would you be able to share the final automation print screen? Thank you in advance. Adam

Like Stefan Salzl likes this
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

Hi @Adam Ziecik 

what does "similar" mean? Please describe your use in details.

If it is not exactly the same and as this post is already solved I would suggest to open a new question with a detailled description of your use case, what exactly your situation is and what you are trying to solve as well as what you´ve tried so far and how far you´ve come.

Best
Stefan

Adam Ziecik
Contributor
April 7, 2023

@Stefan Salzl - it is exactly the same thing that I am trying to achieve. Please could you share how you solved this post?

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 7, 2023

Hi @Adam Ziecik 

did you read through the comments above? I didn‘t build a end2end solution (bc. thr purpose of the community is to support users when they get stuck to guide them to solutions not a marketplace for solutions. To achieve this you could hire many of us, me included as consultants).

Let‘s wrap up what is written above:

An automation rule can‘t be triggered by a test RUN status change (as test runs are not native jira issues). The suggested solution was to work with linked issues - created test executions are linked (with your prefered link type) to the story. As the test runs need are operated by testers and need to be done the test execution should be set to done when all test runs were done. 

Differently to test RUNs a test EXECUTION is a native jira issue and therefore an automation rule could be triggered by its transition.

my suggested rule would look like:

  • Trigger: Issue transitioned
  • Condition: issue type = test execution
  • branch: linked issue (your link type to your story)
  • condition: linked issue is story
  • then (action): transition issue (to your desired status)

Please give it a shot and let us know if you get stuck.

Best
Stefan

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events