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
It is possible to set BuildStatus : 'FAILURE'
to mark build as failed if a report marked as failed.
cucumber fileIncludePattern: '**/cucumber.json', buildStatus: 'FAILURE'
build status is not changing. with this cucumber option buildStatus: . any idea whats wrong ? always { cucumber fileIncludePattern:'*/target/.json', buildStatus: 'UNSTABLE' } [build status change working with currentBuild.result = 'UNSTABLE' ]
@chandu 1) Specified status will be set when the report is marked as failed or unstable. Did you check if you have a failed/unstable report? 2) Your file include pattern looks weird. It will be search a file named exactly
.json
attarget
directory, nested at another directory. For example,dir/target/.json
would match. Are you sure you want this?sorry its typo in my above comment . file pattern is correct fileIncludePattern: '*/target/.json' . i could able to see report and also there are failed reports. but no change in jenkins build status.