minitest / minitest-bisect

Hunting down random test failures can be very very difficult, sometimes impossible, but minitest-bisect makes it easy.

Home Page:http://docs.seattlerb.org/minitest-bisect

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem using Minitest-Bisect in Rails 5.0

martinGerez opened this issue · comments

Hi, I'm having troubles to use Minitest Bisect with Minitest in Rails.

Gem Versions:
Rails 5.0.7
Minitest 5.10.3
Minitest Bisect 1.5.0

When I'm trying to debug intermitentan errors and failures thrown by Minitest, I have this error:

`MTB_VERBOSE=2 minitest_bisect test --seed 42336`
`reproducing.../Users/edgardomartingerez/.rvm/gems/ruby-2.3.1@geotec-rails/gems/railties-5.0.7/lib/rails/test_help.rb:3:in `<top (required)>': uninitialized constant Rails (NameError)
	from /Users/edgardomartingerez/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:133:in `require'
	from /Users/edgardomartingerez/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:133:in `rescue in require'
	from /Users/edgardomartingerez/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in `require'
	from /Users/edgardomartingerez/workspace/geotec-web-2018/test/test_helper.rb:4:in `<top (required)>'
	from /Users/edgardomartingerez/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /Users/edgardomartingerez/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from -e:1:in `<main>'
 in 0.20 sec
Reproduction run passed? Aborting.
Try running with MTB_VERBOSE=2 to verify.`

I need some help please. Thanks.

(updated the above for formatting. Please use ``` guards around code to make them format as code blocks. You can even specify a language (eg ```ruby). Look at "github flavored markdown" for more.

Without a repro, I can't help much more than suggesting things.

Add both minitest-bisect and minitest-sprint to your Gemfile and bundle. Then, try to run your tests using minitest test --seed 42336. If you have problems with that, then there's a general problam running your tests that needs to be figured out. But if that works, and substituting minitest_bisect for minitest fails, then there's definitely a problem here.

anything?

No response from OP. Closing. Please reopen if you respond to my comments.