0

Introduction Currently, I have a working Gitlab pipeline which which fetches, downloads the .feature file from Cucumber framwork, executes the test and upload the results back to JIRA. The JIRA environment is equipped with XRAY plugin as well. This is no issues in that.

Looking for support in
However, there is a new requirement that

  • After downloading the feature file, all the test cases which are orphan or not mapped, needs to mapped to the test repositories which is already created in JIRA (Not sure if this is even possible or not)

Already tried Have already tried searching for a solution in JIRA and Gitlab forums, but was not able to find any relevant post for the same.

has anyone worked on a similar requirement ? What can be done to achieve this ?

TIA

Nike
  • 23
  • 1
  • 10
  • Hi, 1) can you please clarify if you're using Jira Cloud or Jira on-premises (server/datacenter)? 2) I was unable to understand your need, as test cases are not mapped to test repositories.. (they belong to the Test Repository that intrinsicaly is related to the Jira project). Can you please try explaining it in different words? – Sérgio May 10 '21 at 13:44
  • hi ... 1. i am using jira Cloud 2. let me rephrase it with this - i am looking to edit the jira field "Test Repository" for the tests from the Gitlab pipeline via yml file. I want to update the field "Test Repository" with the actual repository path.. – Nike May 10 '21 at 22:24
  • ok, so for my understanding: you're editing the Cucumber Scenarios as Test issues in Xray, right? Then in your GitLab pipeline you're exporting them as .feature and running them against the code (stored in GitLab) that implements the corresponding steps, correct? Finally, you report the results back to Xray. Now, from GitLab side, you want to update the folder where the Tests are within the Test Repository in Xray. Why you need to do this? If the Tests are managed/edited in Xray side, why don't you use Xray to move them to the right folders? Why do you want to do that after running the tests? – Sérgio May 11 '21 at 10:49
  • yes, we are currently using Xray to manage the structure. However, there was a thought that, to update the folder structure for any test which which was missed earlier. Also, it would be easier to maintain everything at a single place. Hence thought to doing it from the pipeline directly. – Nike May 11 '21 at 10:52
  • Sorry I still don't understand the need, maybe this would require a bit more in-depth discussion/clarifiaction. Anyway, I'll provide an answer related to how you can move a Test to a given folder – Sérgio May 11 '21 at 11:08

1 Answers1

0

To move a Test issue to a given foldet, you'll need to use the GraphQL API namelly this mutation. You'll need to know the issue id for each Test case. For that, you would need to do another request. It's not something straighforward and I wouldn't recommend to move Tests between folders in the Test Repository during the execution of the pipeline. The Test Repository is a place where Tests are organized by their semantics and not by execution aspects. Note that there is the Test Plan's Board, an hierarchical organization but for planning/execution aspects; each Test Plan has implicitly a Board that has no relation whatsoever with the Test Repository. The Test Repository is a per-project organization of tests, by their semantics, components, high-level features if you want.

Sérgio
  • 1,777
  • 2
  • 10
  • 12