FWIW, this is how I’ve just solved it after (finally) upgrading our app to Rails 6 and enabling parallelization:
# application_system_test_case.rb
ENV["PARALLEL_WORKERS"] ||= "1"
require "test_helper"
# test_helper.rb
class ActiveSupport::TestCase
parallelize(workers: ENV.fetch("PARALLEL_WORKERS", :number_of_processors))
At least works out of the box for any dev or CI running our system tests.
However, being able to run system tests reliably in parallel would be even better of course, did anyone find ways to make them more reliable?