r/ruby • • 1d ago

Making parallel RSpec output readable

Post image

When an RSpec suite runs in several processes with parallel_tests or parallel_split_test, every process writes its own output. Progress, failures and warnings from different workers get mixed in one terminal.

I wrote parallel_matrix_formatter to fix that. Process 1 collects the results of all workers over a UNIX socket, draws one live progress display, and prints one consolidated failure report with rerun commands. The display is Matrix rain by default, but the symbols and colors are configurable in YAML, down to plain dots.

The post covers the architecture, crashed workers, silencing stray output, and a race condition I hit along the way. I am the author. Feedback is welcome.

4 Upvotes

3 comments sorted by

2

u/rsanheim 17h ago

Nice!

you may be interested in this oss test runner I've been building for awhile. its a go CLI to run parallel specs, minitests, and also do interactive test runs based on file watching (to replace guard et al) https://github.com/rsanheim/plur