willbryant / parallel_rspec

Run individual RSpec examples efficiently in parallel across N cores
MIT License
27 stars 6 forks source link

Simplecov support #9

Open priverop opened 1 year ago

priverop commented 1 year ago

Hello! I've been using this Gem for a while and it works like a charm, good job!

However, I'm trying to use the SimpleCov gem to get the Coverage of the project but it doesn't work correctly:

image

It looks like it's only getting the results of one of the workers.

Apparently SimpleCov checks for some ENV vars to see if parallel_test (I assume it's the gem) is being used: image

If maybe we could add something similar here we could make it compatible. With help I could do the PR.

Has anybody experienced something similar? What do you use to get the test coverage of your project with this tool?

Thanks!

willbryant commented 1 year ago

Yes, that's a known issue. Last time I looked (years ago) there was no parallelism support in SimpleCov, so it's great that they have something now. We could set those vars and see what happens? From a quick skim of the code it looks like maybe SimpleCov is trying to drive the parallelism though? eg. it loads parallel_tests in make_parallel_tests_available.

priverop commented 1 year ago

Thank you for answering so quickly!!

You are right, apparently they require parallel_tests if you have these environment vars... I didn't see that before, maybe it's not as easy as I thought.

I'll create an issue to see their opinion on this.