DEV Community

Cover image for RSpec Tracer
Abhimanyu Singh
Abhimanyu Singh

Posted on • Updated on

RSpec Tracer

https://github.com/avmnu-sng/rspec-tracer

First Run

RSpec Tracer is a specs dependency analysis tool and a test skipper for RSpec. It maintains a list of files for each test, enabling itself to skip tests in the subsequent runs if none of the dependent files are changed.

It uses Ruby's built-in coverage library to keep track of the coverage for each test. For each test executed, the coverage diff provides the desired file list. RSpec Tracer takes care of reporting the correct code coverage when skipping tests by using the cached reports. Also, note that it will never skip any tests which failed or were pending in the last runs.

Knowing the examples and files dependency gives us a better insight into the codebase, and we have a clear idea of what to test for when making any changes. With this data, we can also analyze the coupling between different components and much more.

Top comments (0)