Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Xray import cucumber test results to existing test execution giving error




I've been trying to import cucumber test results to an existing test execution using the REST API provided by Xray (  but I am not being able. It always creates a new test execution.

Is it possible for me to add to an existing test execution?

My info json file looks likes this:

    "fields": {
        "project": {
            "key": "MUL"
        "issuetype": {
            "id": "10302"

When I run:

curl -u username:password -F info=@execution.json -F result=@resultCucumber.json

I get the follwoing error:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><status><status-code>500</status-code><message>;init&gt;(ZLjava/lang/Boolean;Lcom/atlassian/jira/issue/fields/rest/json/JsonType;Ljava/lang/String;Ljava/lang/String;Ljava/util/Collection;Ljava/util/Collection;)V</message><stack-trace>java.lang.NoSuchMethodError:;init&gt;(ZLjava/lang/Boolean;Lcom/atlassian/jira/issue/fields/rest/json/JsonType;Ljava/lang/String;Ljava/lang/String;Ljava/util/Collection;Ljava/util/Collection;)V
at Source)
at Source)
at Source)
at Source)
at Source)
at Source)
at Source)
at com.xpandit.raven.service.executionresult.impl.ExecutionResultImportServiceImpl.b(Unknown Source)
at com.xpandit.raven.service.executionresult.impl.ExecutionResultImportServiceImpl.a(Unknown Source)
at Source)
at sun.reflect.GeneratedMethodAccessor17797.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(
at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(
at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(
at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(
... More errors, I had to delete due to characters limit


1 answer

1 accepted

3 votes
Answer accepted

Hi Rafael, 

To import the Execution Results to an existing Test Execution, you have to export the original cucumber feature file from the Test Execution itself. In this way, the feature file you're exporting it does the reference by a tag to the Test Execution (Test Execution issue key) that you want to import the Execution results. So, when you execute your Tests in the CI environment, the Execution results file that is being generated will also contain the tag that does the reference to the existing Test Execution and Xray will recognize it and will import the results to that Test Execution.

Best Regards, 

Team Xray 



I have similar problem as author of this issue, but I am trying to import results to specific Test Execution via Jenkins plugin. I found documentation and there is said that if I chose "Cucumber JSON Multipart" results type, I would have an additional field named "Import to Same Test Execution" appeared. Currently this field is not available



XRay for Jira: 2.2.0

Hello, Michal,

When you want to import the cucumber test results to a specific test execution you should add the test execution key to the tags field of the cucumber feature.

You can see where to add it exactly if you create a test execution manually, add the cucumber tests there and then export the test execution to cucumber. You will see that for every ".feature" file, there will be a tag with the test execution key. This tag will be in your json afterwards and then Xray will import the results to that test execution.

Hi Rafael,


thanks for info, I am going to test it :)


Don't you think that endpoint for importing Cucumber results should support test execution key? I found that JUnit and other endpoints support it as query param or key in Test Info object, but Cucumber endpoints lacks support for it?


In my opinion this will be valuable feature for your customers because when I would have store my feature in VCS as root repository for all features files, then I need to update them before each run if I want to upload results to single Test Execution




Unfortunately I am not a developer of Xpand-it... I'm just a guy that also struggled with this and after trying out a lot of things I discovered this hahahaha

But I don't know, they might have had a reason to do it this way.

haha, I got it, so you manually update tags in features in order to upload them into one test execution?

I think you can do that.

Initially I wanted to always update the same test execution (so I have a CI test execution). I was fetching the test execution it self, but then I found out that if I did that, I was always fetching the same test steps even though I have changed them. The test execution creates test runs of the tests (which contains the steps) so after running the test once, it would never change again.

Now I am creating a new test execution every time I merge my code into master.  I am fetching the test plan (I have a CI test plan) and running all the tests in that test plan in all branches, but the only branch that pushes the results back to Xray is the master branch. At the end, this helps a bit to see the evolution of the project in terms of the number of tests being executed.

Like Aravind Kesavarapu likes this

Yes, i agree your point cucumber lacks when it compared other types of reports.

I am also facing same. Whenever I want to change test execution i have to pass to my feature file.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Apps & Integrations

🍻🍂Apptoberfest Update: Upcoming Virtual Events 🎉

Hello Community! I hope you've been enjoying the 🍂Apptoberfestivities🍂 (I know I have!) The event is heating up next week with a series of virtual events that we're calling the 🍻🍂Partner App ...

396 views 3 17
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you