-
Notifications
You must be signed in to change notification settings - Fork 553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Coverage not working properly #755
Comments
After some trial and error, it seems that commenting out the parallel testing line (37) still is the solution to fix this problem: class ActiveSupport::TestCase
# Run tests in parallel with specified workers
# parallelize(workers: :number_of_processors);
...
end |
Closing this as there seems to be no activity at the moment. |
I ran into this as well on Rails 6.0.0 and Simplecov 0.17.1. Fixed for the moment by disabling parallel testing. The README interestingly claims this is supported:
So I wonder if there were some changes in how parallel testing is handled in recent Rails versions that caused a regression here. |
@worace rails built their own parallel testing thingy... so far we only integrate with parallel_tests as in the parallel_tests gem. Making it work with rails 6.0 parallel tests is on the roadmap 👌 |
Also sorry hadn't seen this issue or rather.. when I looked it was already closed so I thought it was resolved. |
Ah, makes sense. Thanks for the explanation. I have been out of rails for a bit and did not realize they were different things. |
@PragTob Any updates on this issue? Has this been resolved in the latest version? |
@GURVARINDER no I didn't have time yet to work on tests parallel test execution |
Can I suggest adding to the documentation that Rails parallel tests is not supported at the moment? I just wasted a lot of time trying to figure out why my code coverage was incorrect. |
You can get simplecov working with Rails test parallelization with the fix here: #718 (comment) |
Hi, new RoR guy here.
I'm using
ruby 2.6.3p62
(latest) andRails 6.0.0
(also latest) but this gem (using latest) seems to not show test coverage properly. Below is the setup and the result:Gemfile
:test/test_helper.rb
:app/controllers/pages_controller.rb
: (an example controller)test/controllers/pages_controller_test.rb
: (an example controller test)COVERAGE
output:The text was updated successfully, but these errors were encountered: