Jenkins pipeline failure

I used Jenkins to create a CI pipeline for my node js application. My pipeline includes tasks such as assembly, unit test, integration test, code analysis, etc. I was wondering if it is possible to complete a build failure if, for example, by implementing a threshold, for example, the number of failed tests, z%? I know that by default the assembly will fail if even one test case fails.

0
source share
3 answers

Your unit test script will need to process math and logic to determine what percentage of failed tests is bad enough to fail all the work. Then your unit test script may return a pass (zero) or a failure (something else), and Jenkins will mark the assembly accordingly.

0
source
0
source
-1

All Articles