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

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 !

8 answers

1 accepted

1 vote
Answer accepted

Hi,

 

have a look at the attachment.

unexecutable-tests.png

Kind regards,

Diamantino

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

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.

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 !

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

 

Diamantino Campos

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.

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

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira

Demo Den Ep. 7: New Jira Cloud Reports

Learn how to use two new reports for next-gen projects in Jira Cloud:  Cumulative flow diagram and Sprint burndown chart. Ivan Teong, Product Manager, Jira Software, demos the Cumulative ...

273 views 1 2
Join discussion

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