Can we stop the build execution if any test case(spec.js file) fails?

Can we stop the build execution if any test case(spec.js file) fails?

Hi Joe,

Yes, you can do that by adding the --sof or --stop_on_failure flag which while running the lambdatest-cypress run command and it will stop the complete build if any test case within that build fails.

Syntax:

lambdatest-cypress run --sof or lambdatest-cypress run --stop_on_failure

Note: Currently, if there are multiple test cases(spec.js) within a build and if any one of them fails, it doesn’t affect the execution of other test cases. The other test cases within that build will get executed by default. But if we want to stop the build execution completely when a test case fails, we can do it using the --sof or --stop_on_failure flag.