Search code examples
powershellpester

Halting a Pester test already doomed to failure


If a key Pester test fails, I would like to stop the execution of the remainder of the test script because I know, at that point, none of the remaining tests can possibly pass.

I'm looking for something analogous to Perl's Test::More BAIL_OUT() function. I've tried everything I can think of, including throwing an exception, but the script just marches on with every following test doomed to failure.


Solution

  • This feature is not implemented at this time. You can review the status of the request for the issue Pester Issue 330.