Link Playwright JUnit xml report with Xray test issue by the ISSUE KEY

Paul Dinh Gia October 6, 2021

Hello,

I'm using Playwright Node.js to script some automated test and i'm using the JUnit reporter which provides me xml reports as described in the Xray doc about Playwright 

I have on the Xray side some Generic test issues already created

However, when importing the xml report file into Xray, in order to avoid any additional issue creation, the Generic Test Definition field for the test issues already created on xray is used to identify and match the testcases 

In order to match them properly , the generic test definition has to be as <classname>.<name> according to the xml file

 

I would like to know if it is possible in any way to configure the Playwright xml and match it with the already created test issues not with the Generic test definition field but with the Test issue key

1 answer

1 vote
Rogério Paiva - Xray Xporter
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 18, 2021

Hi @Paul Dinh Gia 

I am not an expert on Playwright Node.js, so I cannot help you on that side.

But from Xray, you can upload the current reports you have and check the Test cases it created. Copy the Test Definition from those Tests into the already created Tests (and delete the automatically created).

Xray used the Test Definition to match existing Generic Test cases, so if you have the correct text in the Test Definition, it will match those tests.

One approach to finding the correct Test Definition is to upload some test reports and check the automatically created Tests and the Test Definition. You may copy the text of the Test Definition into another Test case; ensure that you only have one with the same Test Definition. 

Thank you.

Kind regards,
Rogério Paiva [Xray Support Team]

Paul Dinh Gia October 18, 2021

Thank you @Rogério Paiva - Xray Xporter for the answer, it was very clear. I am currently using your approach to find the Test Definition of my xml report imported. The test definition is actually filled with the <classname>.<name> meta-datas of a testcase in the xml file

I'm actually discussing with Playwright support team to see if it is possible to add a specific meta-data called "issue-key" or "key" for instance. If something like that is added, would it be possible to link this specific meta-data to the issue key directly without using the test definition ?

Rogério Paiva - Xray Xporter
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 19, 2021

Hi @Paul Dinh Gia 

Xray most likely will not link since it uses the Test Definition matching with existing Jira/Xray issues by design.

However, please contact Xray Support (http://xraysupport.getxray.app) so that we can analyze your use case.

Thank you.

Kind regards,
Rogério Paiva [Xray Support Team]

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events