method

parallel_worker_id

parallel_worker_id()
public

Returns the current parallel worker ID if tests are running in parallel, nil otherwise.

ActiveSupport::TestCase.parallel_worker_id # => 2