Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1.  Xray and Jira configuration
    • Xray server/DC or Xray Cloud ? (which implictly will define if Jir server/DC or Jira Cloud are being used) 
    • Server/DC specific settings 
      • Use Jira username/password or Personal Access Token?
      • Jira username
      • Jira password
      • Personal Access Token
    • Cloud specific settings
      • Jira username
      • Jira API Token
  2. On each test on the tool, associate it to an existing Xray Test issue
    1. specify Test issue key

Provide links on external tools to Xray entities to facilitate navigation

Sometimes, some external tools may refer to Xray entities, such as Tests, Test Runs, or others. It may be useful to provide a direct link from the external tool to Xray, to be able to see the target entity on Xray side.

The link to the UI showing the details of the target entity may not returned on the API calls; however, it's possible to easily build it following some rules.

Building the URL for the target link depends on the entity we aim to navigate to; the following table sums this information.


EntityXray Server/DCXray Cloud Notes
Test, Precondition, Test Set, Test Execution, Sub Test Execution, Test Plan

<Jira_base_URL>/browse/<issue_key>


Examplehttps://mylocaljira/browse/EWB-399

<Jira_base_URL>/browse/<issue_key>


Examplehttps://myjiracloud.atlassian.net/browse/EWB-399


Test Run

<Jira_base_URL>/secure/XrayExecuteTest!default.jspa?testExecIssueKey=<testexecution_key>&testIssueKey=<test_key>



Examplehttps://mylocaljira/secure/XrayExecuteTest!default.jspa?testExecIssueKey=EWB-399&testIssueKey=EWB-344

<Jira_base_URL>/projects/<project_key>?selectedItem=com.atlassian.plugins.atlassian-connect-plugin:com.xpandit.plugins.xray__testing-board&ac.testExecutionKey=<testexecution_key>&ac.testKey=<test_key>#!page=test-run&testExecutionKey=<testexecutuion_jet>&testKey=<test_key>&testPlanId=<testplan_key>


Examplehttps://myjiracloud.atlassian.net/projects/EWB?selectedItem=com.atlassian.plugins.atlassian-connect-plugin:com.xpandit.plugins.xray__testing-board&ac.testExecutionKey=EWB-399&ac.testKey=EWB-344#!page=test-run&testExecutionKey=EWB-399&testKey=EWB-344&testPlanId=

Example assuming that we're working on project EWB and that we aim to show the Test Run related to Test EWB-344 in the context of Test Execution EWB-399

Create/update test(s) in Xray

...

  1.  Xray and Jira configuration
    • Xray server/DC or Xray Cloud ? (which implicitly will define if Jira server/DC or Jira Cloud are being used) 
    • Server/DC specific settings 
      • Use Jira username/password or Personal Access Token?
      • Jira username
      • Jira password
      • Personal Access Token
    • Cloud specific settings
      • Jira username
      • Jira API Token
  2. On each test on the tool, associate it to an existing Xray Test issue
    1. specify Test issue key
  3. Discover the custom fields ids of the entities being used

Xray internals

How is Xray data stored

Xray server/DC

Xray data is stored on Jira's database, mostly in Xray specific tables (e.g., for test runs).

...

Some of this information is exposed and managed using the Jira's REST API or through Xray's REST API.

Xray Cloud

Due to the way Atlassian cloud architecture works,  apps such as Xray manage their data in their own way (e.g., in the app cloud infrastructure or in a cloud DB provider). Jira related information (e.g., issues, links) is managed by Atlassian and stored in Atlassian's cloud imfrastructure.

...

It's possible to generate a dump of the Xray managed data; note that this dump doesn't contain the information managed by Jira/Atlassian as that follows a different mechanism.

Custom fields

...

Generically speaking, custom fields (CFs) are like custom attributes. They exist as a means to add additional, well-defined information, to certain entities.

...

But whenever "custom fields" come to mind, we may be referring to different kinds of CFs (as Xray also provides some kind of custom fields), and this may cause some misunderstanding. These are the types of fields we may be referring to:

  • Jira's traditional "custom fields": In Jira terminology, custom fields (CFs) are a way to collect information that isn't available on the default fields. In other words, Jira CFs are a way to add additional metadata to issues.; we can think on them as issue level "attributes", having a id, name, type, and value. Jira CFs are defined at administration level (server/DC, cloud), and may be included on some screens, for certain issue types. These fields can easily be included on Jira standard gadgets, listings, etc. A field has a visual representation and a text representation. Some fields may be searchable and included on JQL queries. Some fields store data, while others are calcula. Some calculated. It's usual for Jira apps/plugins to create specific Jira CFs to present or manage some of their data as seen ahead.
  • Xray managed Jira CFs:  Xray data managed as a Jira CF (server/DC, cloud), cloud); some of these CFs are read-only, while other are read/write. These are also Jira CFs in strict sense. Xray server/DC has many of these; Xray cloud has very few, due to the way apps integrate with Jira cloud. On Xray server/DC some of these fields are stored in Jira's database, others are stored on lucene.
  • Xray's test Test step custom fields: Xray proprietary way of defining named attributes for steps on "manual" scripted tests; definable at project level. These are not listable/includable on Jira issues/gadgets nor exportable using standard Jira mechanisms; they are also not visible to Jira's REST API.
  • Xray's Test Run custom fields: Xray proprietary way of defining named attributes for Test Runs; definable at project level. These are not listable/includable on Jira issues/gadgets nor exportable using standard Jira mechanisms; they are also not visible to Jira's REST API.


Xray's Test Run CFs

Xray server/DCXray Cloud

readupdatereadupdate

Jira CFs

(issue level)

Jira's REST APIJira's REST APIJira's REST APIJira's REST API

Xray data managed as Jira CFs

(issue level)

Jira's REST APIJira's REST APIJira's REST APIJira's REST API

Xray data managed as Jira CFs

(issue level)

Jira's REST APIJira's REST APIJira's REST APIJira's REST API
Jira's REST APIJira's REST APIJira's REST APIJira's REST API
Xray test step CFs
  • on a given Test: Xray REST API v2
  • settings: N/A
  • on a given Test: Xray REST API v2
  • settings: N/A
  • on a given Test: Xray's GraphQL API
  • settings: Xray's GraphQL API
  • on a given Test: Xray's GraphQL API
  • settings: N/A
Xray's Test Run CFs
  • on a given test run: Xray REST API v2
  • settings: N/A
  • on a given test run: Xray REST API v2
  • settings: N/A
  • on a given test run: Xray's GraphQL API
  • settings: Xray's GraphQL API
  • on a given test run: Xray's GraphQL API
  • settings: N/A
Xray test step CFs



Xray managed CFXray server/DCXray Cloud
Begin Date

x

(rw)

x

(rw)

Conditions

x

(rw)

-
Cucumber Scenario

x

(rw)

-
Cucumber Test Type

x

(rw)

-
Dataset valuesx-
End Date

x

(rw)

x

(rw)

Generic Test Definition

x

(rw)

-
Manual Test Steps

x

(rw?)

-
Pre-Condition Type

x

(rw)

-
Pre-Condition association with a Test

x

(rw?)

-
Requirement Status

x

(r)

-
Revision

x

(rw)

x
Steps Count

x

(r)

-
Test Type

x

(rw?)

-
TestRunStatus

x

(r)

-
Test Plans associated with a Test

x

(rw?)

-
Test Repository Path

x

(rw)

-
Test Sets associated with a Test

x

(rw?)

-
Test Count

x

(r)

-
Tests association with a Pre-Condition

x

(rw?)

-
Tests associated with a Test Plan

x

(rw?)

-
Tests association with a Test Set

x

(rw?)

-
Tests association with a Test Execution

x

(r)

-
Test Environments

x

(rw)

-
Test Execution Defects

x

(r)

-
Test Execution Status

x

(r)

-
Test Set Status

x

(r)

-
Test Plan Status

x

(r)

-


Tips

  • try to use the proper APIs as much as possible and avoid using CFs to obtain or modify data

References

Recommendations, tips,  and concerns

...