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:https://support.smartbear.com/zephyr-scale-server/docs/test-automation/integrations/configure-jenkin...) . 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:
+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
Solved! Go to Solution.
@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 https://usjira.iscinternal.com/rest/atm/1.0/automation/execution/cucumber 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 (https://github.com/webdriverio-community/wdio-cucumberjs-json-reporter/issues/68)
"name": "PAYS - Russia - telecommandes header-main-menu - CTA",
You can also test the uploads separately via url --basic --user ****:******** -F "firstname.lastname@example.org" https://usjira.iscinternal.com/rest/atm/1.0/automation/execution/cucumber/DP?autoCreateTestCases=tru...
Thank you very much for your feedback
I upgraded my "wdio-cucumberjs-json-reporter" into "^4.1.4". My "steps:  array" is not empty now, but when I tried to publish the tests result in Zephyr Scale Server (8.0.3) I have the same error if I use the Zephy Scale pluggin in Jenkins
It's working if I zip my result and run a curl command from the rest API like this:
curl --basic --user MYLOGIN:MOTDEPASS -F "email@example.com" https://MYURLJIRA/jira/rest/atm/1.0/automation/execution/cucumber/MYPROJECTKEY?autoCreateTestCases=f...
Do you have an idea of the issue with Zephy Scale pluggin in Jenkins ?
In attachment, the error message in the build, and a json result.
Thank you in advance
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.