Search code examples
jenkins-pipelineserenity-bdd

How to make Jenkins build passed or unstable depends on Serenity reports


How to make Jenkins build unstable if there are failure test cases in serenity report? I am using Jenkins declarative pipeline and publishing serenity reports using HTML publish plugin.


Solution

  • See this post for a related question.

    You could either write your own script with exit codes as the author originally started with, or you could experiment with a plugin like top answer suggests.

    Writing your own script will give you more control, but implementation might take less time using a plugin.