I am using Minitest as the runner for my functional tests, using Selenium as the driver to run the browser. Each test is modeled as MiniTest::Unit::TestCase.
Minitest reports summary of execution when it completes executing all tests. The Exceptions that were encountered are also printed towards the end of the execution. I find it difficult to debug when something unexpected fails as the context of execution is lost. The exceptions I am running into are not deterministic.
Is there a way to make Minitest runner to stop execution of tests on exception or assertion failure?
I am using minitest (2.11.2) and ruby 1.9.2p290 (2011-07-09) [i386-mingw32]
try rails test -f
will do it. It means abort test run of first failure or error.
Use -f
.
In pure ruby, as you ask for, this means ruby <file> -f
.
In rails, this means rails test -f
.
Minitest will check the terminal's arguments for the -f
flag, so how you call it appears to not be relevant to the -f
flag.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With