For now Unit test execution failure could be caught in MergeCoverageReportsTask.
if (Sitecore.Variables.UnitTestsFailed) { throw new Exception("One or more tests are failing"); }
If we do not run MergeCoverageReportsTask, but Unit tests failed in RunServerUnitTestsTask or in RunClientUnitTestsTask, we will not get failure at the end.
Solution
TO add additional boolean parameter, with the help of which we can control if we want to fail unit tests immediately or only on the step MergeCoverageReportsTask
For now Unit test execution failure could be caught in MergeCoverageReportsTask.
if (Sitecore.Variables.UnitTestsFailed) { throw new Exception("One or more tests are failing"); }
If we do not run MergeCoverageReportsTask, but Unit tests failed in RunServerUnitTestsTask or in RunClientUnitTestsTask, we will not get failure at the end.