Import JASON execution results from cucumber

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 !

6 answers

1 accepted

This widget could not be displayed.

Hi,

 

have a look at the attachment.

unexecutable-tests.png

Kind regards,

Diamantino

This widget could not be displayed.

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

This widget could not be displayed.

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

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

This widget could not be displayed.

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 !

This widget could not be displayed.

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

 

Diamantino Campos

This widget could not be displayed.

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 !

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

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

223 views 3 0
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you