Automation testcases failing in kubernetes but jenkins pipeline passing
TestCafe finishes test execution when the exit code equals the number of failed tests. E.g., if all tests are passed, the exit code will be 0; if three tests fail, the exit code will be 3.
So, you need to abort the Jenkins pipeline using any available way: Executor.interrupt, error-signal, etc.