Closed fabioformosa closed 3 years ago
I believe the path to the report is incorrect. I need more details to reproduce and fix the problem. Check the real location of the JSON file and logs
The path is specified in my jenkinsfile:
post {
always {
cucumber fileIncludePattern: 'build/reports/*.json', sortingMethod: 'ALPHABETICAL'
archiveArtifacts artifacts: 'build/reports/e2eTests.html', allowEmptyArchive: true
}
I point out that I have 2 jenkinsfiles (one for DEV env and another one for QA env). The path is the same in both, but only QA env uses the remote jenkins agent. So, summarizing, the same path works in DEV, not in QA.
Take a look at the following screenshot. When tests are run against the remote agent, we have 3 workspaces. The workspace where is located the path is the last one of the three (I've checked and the path is correct there):
Have you ever tried to collect report with the plugin when the tests are run against a remote jenkins agent as described here https://www.jenkins.io/doc/book/using/using-agents/ ?
Hi! I solved the problem by moving the global post block with the cucumber step to a post block on the stage running on the remote agent.
Awesome @brunomendola. I close this issue.
Version report
Jenkins and plugins versions report:
Reproduction steps
Results
Expected result:
I would like to see cucumber reports event if I run tests in the jenkins agent, instead of master node.
Actual result:
No reports available.
It seems the plugin looks for reports in the jenkins-master's workspace, not in the jenkins-agent's workspace. When there's a remote jenkins agent, there are multiple workspaces.
Is it possibile to browse reports stored into the jenkins agent?