Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Cypress cucumber XML results incorrect integration with Xray Import API

Andreu
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 28, 2019

Hi,

I'm facing a problem and I hope you can help or assist in some way.

At the moment we are trying to integrate Xray and JIRA with Cypress (more specifically, Cypress-Cucumber).

The issue I'm facing is that given how Cypress-cucumber generates the xml report for the test results, whenever I import those results using Xray Cloud API, even if I have a test case with a matching name, it creates a new test case (with the same name).

I have managed to find the problem, which is on Cypress-Cucumber, as when it creates the xml report, for the classname, it's adding both the Feature name and the Scenario name.
Let me give you an example:

Feature: TestSet - Make login
Scenario: TestCase - Incorrect login

When it generates the xml, what I get is this:

<testsuite name="TestSet - Make login" timestamp="2019-06-28T08:09:59" tests="1" failures="0" time="13.264">
<testcase name="TestCase - Incorrect login" time="5.624" classname="TestSet - Make login TestCase - Incorrect login"> </testcase>

 

After importing this xml, even if I have a test case called TestCase - Incorrect login under the test set TestSet - Make login, it will create a new test case with the same name, without the cucumber code, because the classname differs from the one I created.

 

Has anyone had any experience using Cypress-cucumber and the mocha junit reporter with Xray API for importing results?

 

Any idea how to fix this?

 

My process was:

1) Create test set using Xray in JIRA

2) Create test case using Xray in JIRA and assign it to test set

3) Export test set as a cucumber feature

4) Import feature to Cypress, add code, execute test

5) Import XML results file to Xray API

 

After that, what I explained, instead of adding a test run to the test case, it created a new test case.

 

I have the option to add properties to the xml, so I could add the key for the test set, but I don't know if that would work and if so, what should I write (it can be for example BUILD_KEY=2149)

1 answer

0 votes
Inês Silva
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.
July 5, 2019

Hi Andreu,

You can see more info regarding importing cucumber tests here: https://confluence.xpand-it.com/display/XRAYCLOUD/Importing+Cucumber+Tests+-+REST

If this not help, you can always create a ticket in our Support Desk

Best regards,
Xray Team

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events