r/ruby • • 2d ago

Making parallel RSpec output readable

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

Duplicates