Search code examples
jenkinscucumberjenkins-pipelinejenkins-declarative-pipeline

Jenkins cucumber reports


I'm using Cucumber reports plugin in my declarative pipeline like that:

cucumber '**/cucumber.json'

I'm able to check if some tests fail through link on the sidebar, but do I need to do something to mark the stage containing cucumber.json check as failed if some cucumber reports are failed? Because the problem is the build and stage are both green and successful despite there are some failed cucumber reports.

Jenkins version is 2.176.3

Cucumber reports version is 4.10.0


Solution

  • It is possible to set BuildStatus : 'FAILURE' to mark build as failed if a report marked as failed.

    cucumber fileIncludePattern: '**/cucumber.json', buildStatus: 'FAILURE'