Our test quite takes a while to run, and there is always this 5-10 minute period where we know which test has failed, but we can't see the failure message or backtrace until the suite finishes. It would be more efficient to see the backtraces as they happen. Is this possible?
I use Fuubar to get immediate failure messages and backtraces while the suite continues, as well as get a more meaningful indicator of how far my test suite has progressed.
You have two options:
1) fail fast
# spec/spec_helper.rb
RSpec.configure do |c|
c.fail_fast = true
end
..or use it from the command line
$ bundle exec rspec spec/ --fail-fast
.F
Failures:
1) Swinger should set the Capybara driver
Failure/Error: Capybara.current_driver.should_not == :rack_test
Finished in 0.00479 seconds
2 examples, 1 failure
Basically this option on error will stop the test suite and it will print the error.
2) use rspec-instafail gem
https://github.com/grosser/rspec-instafail
This gem will show failing spec instantly and it will continue running specs.
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