How to configure autotest to restart only with rspec examples error

My impression of how the autotest is designed to work (based on the cucumber github wiki and other materials on the Internet) is that it should be restarted in red with examples until they pass. My problem is that it re-runs all the examples in the spec file where the failed example was found, including the traversal. I would prefer not to waste time repeating the examples, fixing the unsuccessful. Is it possible to configure autotest to run only unsuccessful examples?

+6
source share
1 answer

You need an rspec-retry gem. Here are some examples from the docs on how to implement them:

Apply it in the configure block covering the entire test package ...

 RSpec.configure do |config| config.verbose_retry = true # show retry status in spec process config.default_retry_count = 3 end 

Or apply it individually ...

 it 'should randomly succeed', :retry => 3 do expect(rand(2)).to eq(1) end 
0
source

Source: https://habr.com/ru/post/899470/


All Articles