Forum Discussion

ykowalko's avatar
Occasional Contributor
3 years ago

Unable to Publish Cucumber Tests Results, using Jenkins (pluggin zephyr scale), to Zephyr Scale


We have developed some tests automatized from the frameworks named "webdriverIO" and "Cucumber".

Our scenarios of testing are uploaled automaticly from the "Zephyr Scale" (https://......./jira/secure/Tests.jspa#/design?projectId=xxxxxx) with a jenkins job using the pluggin "zephyr scale" (like this: . And It's working.

After the running of the execution of the tests, we generated a "cucumber report" (in a json file) and "junit report" (in a xml file) adding in a folder of my repository GIT

From Jenkins, and the "Zephyr Scale pluggin", we want published these results/reports in the "Zephyr Scale" in JIRA. BUT It's not working

When we are running the build, we have this issue :


[Zephyr Scale] [ERROR] *There was an error trying to publish test results to Zephyr Scale*. Error details:
*There was an error with the Jira Instance(https://........./jira). Http Status Code: 500*
[Zephyr Scale] [ERROR] Tests results have not been sent to Zephyr Scale
ERROR: Build step failed with exception
at com.adaptavist.tm4j.jenkins.extensions.postbuildactions.TestResultPublisher.perform(
at jenkins.tasks.SimpleBuildStep.perform(
at hudson.tasks.BuildStepCompatibilityLayer.perform(
at hudson.tasks.BuildStepMonitor$1.perform(
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(
at hudson.model.Build$BuildExecution.post2(
at hudson.model.AbstractBuild$
at hudson.model.Run.execute(
at hudson.model.ResourceController.execute(
Build step 'Zephyr Scale: Publish Test Results' changed build result to FAILURE
Build step 'Zephyr Scale: Publish Test Results' marked build as failure
Finished: FAILURE

+In my job jenkins I used these params+
> Manage Source Code/Git/Repositories/Repository URL = url of my git
> Manage Source Code/Git/Repositories/Credentials = my credentials
> Manage Source Code/Git/Branches to build/Branch Specifier = the branch where are the json cucumber report
> Action After the build/Zephy Scale: Publish Test Results/Jira Instance = url of my jira
> Action After the build/Zephy Scale: Publish Test Results/Project Key = the key of my project
> Action After the build/Zephy Scale: Publish Test Results/Test framework = Cucumber
> Action After the build/Zephy Scale: Publish Test Results/File path = the path of the cucumber reports (.json)

Do you know why the publish of my cucumber results in the zephyr scale JIRA pushed a server error?
Do you have an exemple of json file to send a result in Zephyr Scale?

In attachment my cucumber result file (but in .txt)

Note I use :

Zephyr Scale Server

- version 8.0.3

- without used  API Zephyr KEY

Thank you in advance for your help and advices
Best regards

  • ykowalko the issue is this output in the json report, which records an "element" the feature corresponding to the feature itself (keyword: Scenario, type: feature), and has an empty steps: [] array.  The Zephyr scale api (which I presume the Jenkins plugin uses) doesn't support empty steps arrays. The latest wdio-cucumber-js-json reporter has been fixed so you can download the latest version 4.1.4 and try again (


    "tags": [],
    "elements": [
    "keyword": "Scenario",
    "type": "feature",
    "description": "",
    "name": "PAYS - Russia - telecommandes header-main-menu - CTA",
    "tags": [],
    "id": "pays---russia---telecommandes-header-main-menu---cta;pays---russia---telecommandes-header-main-menu---cta",
    "steps": []


    You can also test the uploads separately via url --basic --user ****:******** -F ""

  • ykowalko 

    That api endpoint should be available on Zephyr Scale Server.  I'm not entirely sure that is what the Jenkins plugin uses (though that would make sense).  But it's the endpoint that we use to test uploads manually with Postman.

    I was able to upload your tests to our instance by saving the text as a .json file and zipping (zipfile attached).  Perhaps the issue is that the file extension on your file is ".xml".  If the file extension is not ".json" in Postman, the error "Invalid zip file" is returned.  Maybe that is the error that Jenkins is reporting.

    Note the tags arrays were removed from the json in the attached zip file since otherwise there's an error about no matching test key.



5 Replies