Picture of the author

GAURAV VARMA


Rails 6 adds built-in parallel testing, allowing test suites to run across multiple CPUs or processes simultaneously.

Why parallel tests?

As projects grow, test suites can become slow. By distributing tests across CPUs, parallel testing improves feedback time and productivity.

How to enable it

1rails test:parallel

This automatically splits the test suite into multiple workers.

You can customize the number of workers:

1PARALLEL_WORKERS=4 rails test:parallel

Links

Summary

Rails 6’s parallel testing feature helps developers ship faster by speeding up test feedback. It’s easy to set up and works out of the box with Minitest.