rapidcheck icon indicating copy to clipboard operation
rapidcheck copied to clipboard

Parallelized test execution

Open emil-e opened this issue 10 years ago • 4 comments

Assuming there are no globals, you can most likely run multiple test cases in parallel. Also useful when searching for shrinks... gotta be a lot faster?

emil-e avatar Sep 25 '15 16:09 emil-e

I notice there is a patch in the queue. Has progress been delayed?

fire avatar Oct 06 '15 00:10 fire

That patch is for race condition testing, not for increasing test case throughput.

It's a work in progress but it's not an effort by me personally so I can't speak on the time frame.

emil-e avatar Oct 06 '15 04:10 emil-e

@fire: The race condition testing should be feature complete, but I need to finish writing the documentation first, and some more tests are needed as well. Been away for a couple of weeks but I hope I will be able to work on this the comming weeks.

If you want to try it out you can use this example as a starting point: https://gist.github.com/furuholm/aac7f1d2d6fc6500118b.

You need to change two things to run parallel tests:

  1. Change your Commands to use the overload of the run function that looks like this std::function<void(const ModelT&)> run(Sut &sut) const
  2. Use rc::state::checkParallel instead of rc::state::check

furuholm avatar Oct 06 '15 07:10 furuholm

Sorry, I was busy and was not able to try.

fire avatar Oct 11 '15 08:10 fire