Forum Discussion

ykowalko's avatar
ykowalko
Occasional Contributor
4 years ago
Solved

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

Hi,

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-jenkins.html) . 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 :

{code}

[Zephyr Scale] [ERROR] *There was an error trying to publish test results to Zephyr Scale*. Error details:
com.adaptavist.tm4j.jenkins.http.Tm4jJiraRestClient.processUploadingResultsResponse(Tm4jJiraRestClient.java:102)
com.adaptavist.tm4j.jenkins.http.Tm4jJiraRestClient.uploadCucumberFile(Tm4jJiraRestClient.java:36)
com.adaptavist.tm4j.jenkins.extensions.postbuildactions.TestResultPublisher.perform(TestResultPublisher.java:87)
com.adaptavist.tm4j.jenkins.extensions.postbuildactions.TestResultPublisher.perform(TestResultPublisher.java:67)
jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123)
hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:80)
hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:803)
hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:752)
hudson.model.Build$BuildExecution.post2(Build.java:177)
hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:697)
hudson.model.Run.execute(Run.java:1932)
hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
hudson.model.ResourceController.execute(ResourceController.java:97)
hudson.model.Executor.run(Executor.java:429)
*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
java.lang.RuntimeException
at com.adaptavist.tm4j.jenkins.extensions.postbuildactions.TestResultPublisher.perform(TestResultPublisher.java:76)
at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123)
at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:80)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:803)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:752)
at hudson.model.Build$BuildExecution.post2(Build.java:177)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:697)
at hudson.model.Run.execute(Run.java:1932)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
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
{code}



+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
Yannick

5 Replies