Hi folks,
This will be a long-red 🙈🙈
This is kind of a tricky experiment (at least for me) I am trying to build. I would like to build kind of a DevOps pipeline especially the testing part and also automating the test result reporting back in Jira (Xray), Jira project is connected to my Github repo. Here comes my plan:
- Let´s say we have a UserStory "ABC-1", 2 xray generic test cases linked to UserStory (test cases have keys "ABC-2", "ABC-3")
- the whole pipeline should run on PR
- in Jira context: created an automation rule that creates a "sub test execution"Â
- in github: configured github action yaml that action only executes on event PullRequest
- when PR is created
- in Jira: Sub Test Execution is created (key "ABC-4") within the user Story (ABC-1)
- github: action starts, runs tests and generates test-result.xml
Â
Here comes the problem:
I was able to import the test-result.xml via cURL which generates a standard Test Execution. Even it pays into my coverage of the UserStory (test cases are mapped correctly) I would like to have the test execution as a Sub Test Execution within the UserStory as it is automatically "linked" to the Story and for better traceability.
Â
My questions:
- If github could get the information of which key was generated in the jira automation rule (ABC-4) I could import the test result file to this issue. Does anyone know how this could be done? (especially as the action in github is starting at the same time)
- If this is not possible could I create the Sub Test Execution out of my github action (guess this should also be possible with cURL similar to how I import test-result file). The question in this case is:
- How could I get the parent key of my UserStory to tell the API where the Sub Test Execution should be created? (mainly several items in my repo contain of the issue key in order to have those things linked. So the branch, the commits and also the PR will start with the issue key of the story ABC-1). Could I "extract" the issue key from the PR description?
Â
Thanks in advance for any helpful feedback.
Â
Best
Stefan