# TestProf

> Ruby Tests Profiling Toolbox

Source: https://talira.ai/catalog/testprof-2q4w0bfz
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [developer tools / testing / test performance](https://talira.ai/categories/developer-tools/testing/test-performance), [languages / ruby](https://talira.ai/categories/languages/ruby)
- Licence: MIT[^1]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Self-hostable: yes[^2]
- API: yes[^3]
- Backed by: [Evil Martians](https://talira.ai/orgs/evil-martians.md)
- Creator: Vladimir Dementyev, Evil Martians

TestProf is a collection of tools for finding and fixing what makes a Ruby test suite slow, for [RSpec](https://talira.ai/catalog/rspec-87n8pes2.md) and Minitest. Its profilers report time spent in ActiveSupport events such as SQL queries (EventProf), setup time in `before` hooks and `let` (RSpecDissect), factory usage and unnecessary database writes (FactoryProf, Factory Doctor), memory spikes (MemoryProf) and tests per second by group (TPSProf), and it plugs into ruby-prof and stackprof. Its recipes speed tests up: `before_all` and `let_it_be` create data once per group, AnyFixture and FactoryDefault reuse shared records, and it ships [RuboCop](https://talira.ai/catalog/rubocop-rxzhjmy8.md) cops for slow test patterns. Evil Martians builds it.

## Links

- Website: https://test-prof.evilmartians.io/
- GitHub: https://github.com/test-prof/test-prof
- Docs: https://test-prof.evilmartians.io/

## Problems it solves

- our RSpec suite takes 40 minutes and I can't tell which tests are the slow ones
- find out how much of my test run is spent in database queries versus everything else
- factories build whole graphs of associated records that a test never looks at
- tests save records to the database when an unsaved or stubbed object would do
- setup in before hooks and let blocks eats most of our test time
- create expensive test data once per example group instead of once per example
- a few spec files use so much memory that our CI runners run out
- which test groups run the fewest tests per second, so we know where to start optimising
- fail the build when a test group gets slower than a threshold
- profile the test suite with stackprof or ruby-prof without wiring it up myself
- see which factories run most often and how many extra records each one creates
- run a random sample of the test suite to profile it quickly
- lint our specs for patterns that make them slow
- speed up a slow Minitest suite in a Rails app

## Features

- EventProf: time spent in ActiveSupport::Notifications events such as SQL queries
- TagProf: time by test type or tag
- Factory Doctor: finds tests that write to the database without needing to
- FactoryProf: factory usage counts and cascades, with flamegraphs
- RSpecDissect: time spent in before hooks and let
- MemoryProf: RSS, allocations and GC time per example or group
- TPSProf: tests per second by top-level group, with a strict mode that fails the build
- ruby-prof and stackprof integrations
- before_all hook and let_it_be helper for data created once per group
- AnyFixture, FactoryDefault and FactoryAllStub recipes
- RSpec Stamp to tag examples automatically
- tests sampling
- RuboCop cops
- RSpec and Minitest support, MRI and JRuby

## Capabilities

- Has an API: plan not known

## Trust

Overall: 0.48 out of 1.
Signals: backing 0.70, extensibility 0.20.

- backed by Evil Martians
- created by Vladimir Dementyev, Evil Martians
- used by Discourse, GitLab, dev.to, OpenProject

Warnings:

- GitHub activity not fetched yet

## Sources

[^1]: https://github.com/test-prof/test-prof/blob/master/LICENSE.txt (checked 20 Nov 2026)
[^2]: https://github.com/test-prof/test-prof (checked 20 Nov 2026)
[^3]: https://test-prof.evilmartians.io/ (checked 20 Nov 2026)
