Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allure results contains failed tests -fail the build with unstable state #375

Open
ohad-shay opened this issue Dec 4, 2024 · 1 comment

Comments

@ohad-shay
Copy link

hi
using ci/cd
my playwright tests run and some failed
the allure report is being generated ( the plugin version is 2.32 in jenkins)
i saw that the currentBuild.result is UNSTABLE, therefor my ci/cd failed with unstable
i try to script.catchError(buildResult: "SUCCESS", stageResult: "UNSTABLE") when create the allure report
the thing is that noting is being caught, and stage code run ok, but just the currentbuild result is unstable

i want that the stage of generating allure report will be success always, unless i have exception that will be catch by the catchError

how this can be done?
i cannot overwrite the build result when it failed
is there an allure plugin version (lower version) that i can use, that will keep the stage and build results as success, altough i have failed tests in the report ( which is ok by me)

@ohad-shay
Copy link
Author

i see in your repo https://github.com/jenkinsci/allure-plugin/blob/master/src/main/java/ru/yandex/qatools/allure/jenkins/utils/BuildSummary.java

line 58
public Result getResult() {
if (getFailedCount() > 0 || getBrokenCount() > 0) {
return Result.UNSTABLE;

what if i dont want to have unstable if i have tests that failed, i want to get SUCCESS
is there an option to do it when coding , to pass a parameter or somthing ?
if not , is there a version of allure plugin or allure cli that will set build result status to SUCCESS anyhow?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant