Import JASON execution results from cucumber

Ewgeni August 11, 2016

Hello,

 

I am manually trying to import cucumber test execution results for my project.

 

I tried to go through the test execution in the manual way.

At first I exported a future file from my test and executed it in cucumber in connection with selenium webdriver.

Then I exported the execution results formatted in JASON using the CucumberOptions:

@CucumberOptions(
plugin = {"json:target/json/jsonout.json"})

 

 As the final step I tried to import the generated JASON file into XRAY getting the following message:

“Error importing execution results to database:
User XXX does not have permission to execute test execution with key XCTP-56”

 

I am actually pretty sure that the issue is not caused by the permissions because I already tried to import the file with admin permissions too.

 

Can someone please give me an advice how I can solve this problem ?

 

Thank You !

8 answers

1 accepted

2 votes
Answer accepted
Diam Campos August 16, 2016

Hi,

 

have a look at the attachment.

unexecutable-tests.png

Kind regards,

Diamantino

2 votes
Ewgeni August 16, 2016

Hello Diam,

 

thank you very much for helping me finding a solution.

 

I checked the permissions and the resolution permission is given.

 

But as I tried to check whether the workflow is marked as executable or not, I didn’t find the menu item in the XRAJ administration pages.

We are using the default workflow currently.

Could you please describe how to find these properties?

I would be very grateful if you can take a screenshot.

 

Thank you !

2 votes
Diam Campos August 12, 2016

Also, just to give you an insight on possible causes. User that upload the result must have the RESOLUTION permission and the Test Execution can not be in a Workflow status marked as non-executable.

 

Kind regards,

Diamantino Campos

Diam Campos August 12, 2016

The Test Execution Statuses set as non-executable are defined in Xray administration page.

2 votes
Diam Campos August 12, 2016

Hi Ewgeni, I've just tried to import a result.json file with you example (just changed the T.E CSM-31 and Test XCTP-54 to match mines) and all went fine.

 

Can you please open a ticket on Xray support portal and share you atlassian-jira.log file right after trying to import?

http://jira.xpand-addons.com/servicedesk/customer/portal/2

Kind regards,

Diamantino Campos

0 votes
Nick Iles _AssertThat_ October 30, 2019

Hi

You can also import Cucumber json test automation results using the below plugin.  

https://marketplace.atlassian.com/1219033

We are the marketplace vendors for this app.  If you would like a demo then please get in contact

 

Thanks

Nick

support@assertthat.com

0 votes
VikasB February 21, 2019
0 votes
Ewgeni August 12, 2016

Hi Diam, as already mentioned I' am using the JIRA interface.

Although the documentation says the Cucumber JSON format is supported, I could imagine that my JSON format, generated by cucumber, is the wrong one.

[
  {
    "line": 2,
    "elements": [
      {
        "before": [
          {
            "result": {
              "duration": 3394644376,
              "status": "passed"
            },
            "match": {
              "location": "StepDefinitions.setup()"
            }
          }
        ],
        "line": 6,
        "name": "Login",
        "description": "",
        "id": "as-a-user-i-want-to-log-in-to-the-portal;login",
        "type": "scenario",
        "keyword": "Scenario",
        "steps": [
          {
            "result": {
              "duration": 1756353112,
              "status": "passed"
            },
            "line": 7,
            "name": "I am on the login portal",
            "match": {
              "location": "StepDefinitions.shouldNavigateToPortal()"
            },
            "keyword": "Given "
          },
          {
            "result": {
              "duration": 127119714,
              "status": "passed"
            },
            "line": 8,
            "name": "I fill in my login data",
            "match": {
              "location": "StepDefLoginData.i_fill_in_my_login_data()"
            },
            "keyword": "When "
          },
          {
            "result": {
              "duration": 88051877,
              "status": "passed"
            },
            "line": 9,
            "name": "I press the login button",
            "match": {
              "location": "StepDefinitions.shouldPressLogIn()"
            },
            "keyword": "And "
          },
          {
            "result": {
              "duration": 2025042976,
              "status": "passed"
            },
            "line": 10,
            "name": "I should see the Aufgabenuebersicht",
            "match": {
              "location": "StepDefinitions.shouldSeeAufgabenuebersicht()"
            },
            "keyword": "Then "
          }
        ],
        "tags": [
          {
            "line": 5,
            "name": "@XCTP-54"
          }
        ]
      }
    ],
    "name": "As a user i want to log in to the portal",
    "description": "",
    "id": "as-a-user-i-want-to-log-in-to-the-portal",
    "keyword": "Feature",
    "uri": "2_CSM-31.feature",
    "tags": [
      {
        "line": 1,
        "name": "@CSM-31"
      }
    ]
  }
]

 

If this is the wrong format, could you please explain, how to export to a suitabloe format via Cucumber ?

 

Thank You !

Jolene
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!
September 27, 2017

Can you please post the answer to this question?  I am also using the same format and the import isn't working.

Like Tejasvi likes this
0 votes
Diam Campos August 11, 2016

Hi Ewgeni, are you using REST api or JIRA interface? Can you share you json result file?

 

Diamantino Campos

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events