ohbarye / pbt

Property-Based Testing tool for Ruby, supporting multiple concurrency methods (Ractor, multiprocesses, multithreads).
https://rubygems.org/gems/pbt
MIT License
207 stars 4 forks source link

Run each propery test in parallel to unlock Ractor's potential #2

Closed ohbarye closed 6 months ago

ohbarye commented 6 months ago

Issue

So far, although this gem can run each example in parallel the max number of parallelism is limited to 100 or around that.

Change

This change allows this gem to run N properties x N examples by highlighting the Ractor's characteristics. If you write 10 properties, this gem runs 1,000 examples in parallel (10 properties x 100 examples).

Note

The syntax is not sophisticated for now. In order to wait for each Ractor to finish, users need to write Pbt.wait_for_all_properties at the end of a test example.