Xray for Java-Cucumber + Jenkins

Deleted user April 25, 2018

Hello.

We’re evaluating Xray plugin as a way to get better visibility in our projects linking between features on one side and tests on another. We did install Jenkins plugin, configured JIRA and “Test Connection” is successful.  As a prototype we took an existing Java project with Cucumber tests. On JIRA side we had a project where we manage requirements. So we added another JIRA project using Xray template. Suppose its ID is XRAY and issues have IDs like XRAY-1. In the source tree we manage Cucumber features under src/test/resources/features/**/*.feature. Those feature files usually combine several tests for each feature. We created a new ticket of type test in XRAY project so its ID is XRAY-1. We put it in the feature running this test like

@get_catalo
@permission
@issue:XRAY-1
Scenario Outline: Get catalog

While other tests in the same feature might have other tags (we were trying to use Zephyr previously). We are able to execute the test running job correctly. It generates Cucumber report in target/json/cucumber.json. We can see the test with the new tag XRAY-1 in a published report. But when we try to enable Xray: Results Import Task we get

ERROR: Step ‘Xray: Results Import Task’ failed: Unable to confirm Result of the upload..... Upload Failed! Status:400 Response:No tests found in execution result

So, what we’re doing wrong?

Thanks.

With best regards,

David.

4 answers

1 vote
José Domingues [Xray]
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
May 14, 2018

Hi David,

This situation is described here in the Common problems section. Most probably you're trying to submit a Cucumber JSON results file without having previously created the Cucumber Tests.

To work with cucumber you need to follow this procedure.

 

Best regards,

Xpand Add-ons Team

Deleted user May 16, 2018

Well, the problem was and we figured it out by now that we used @issue:XRAY-1 similarly to Zephyr. When switching to @XRAY-1, providing that we had Xray test with XRAY-1 ID in JIRA, it resolved the problem. So the problem was how Jenkins plugin parses the report. It could be that the schema could be extended to support more flexible tagging but we're not there yet and it is beyond the basic prototyping we're performing.

Ankur Ahuja September 11, 2018

hi

0 votes
Ajay Kumar October 9, 2019

I have a Cucumber script written in Eclipse. So, now my client wants to Integrate with Xray-Jira. He already created a story under it. And, I have followed the below steps for configure. Please help me to understand the next steps:

  1. Created 2 Test Types with Scenario
  2. Created one story and linked the above 2 tests under it 
  3. Now, Export the Cucumber feature file
  4. I went to the Eclipse feature file and updated the existing feature file with the new one5. Now, when I'm running the Test under Jira, nothing happens. Please help me if I did anything wrong.
0 votes
Moni Hazarika December 4, 2018

Only One test execution imported in Jira via Jenkin.

 

@Scenario2
Scenario Outline: Valid City Search
Given User navigate to openWeatherMap url <URL>
Then openWeatherMap page is displayed
When User enters vaild city <city>
When User clicks on search button
Then website successfully returns weather details for the city

Examples:
| URL | city | resultcount |
| https://openweathermap.org/ | Mumbai | 1 |
| https://openweathermap.org/ | Lon | 5 |

 

This Test Cases is exported from Jira xray, running two times. But after importing back to jira. Only One result is displayed

0 votes
Driss Biaz November 13, 2018

Hi David,

Can you please explain to me how you do for the configuration of jenkins for execute test and view it in jira thanks 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events