Speeding Up Your Test Suite
summary
RSpec test suite uses FactoryGirl, Zeus/Spring and mocks to cut runtime: a codebase with 35 minutes of full runs is reduced to ~10 minutes overall, and a seven‑example service spec drops from ~15s to ~3s by removing forced DB cleans, reusing associations, switching many creates to FactoryGirl build_stubbed, and mocking external posts to the notifications API. Measurement is via Zeus or Spring and the talk claims ~47% savings from DB-clean removal and ~80% savings after all optimizations.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 1:15The importance of speed
- 1:46Before
- 2:35Measure
- 3:22Scenario
- 4:57Database Clean
- 5:37Declaration Reuse
- 6:49Build Up
- 8:05Mocks
related talks
29m"Testing. Why so serious?"
29mYour test suite is making too many database calls!
38mTake your slow tests to the doctor
02h 05mFrom slow to go: Rails test profiling hands-on
24mSupercharging CI: Test Suite Optimization for Speed, Stability, and Savings
29mCommon Mistakes that make test cases flaky and how to avoid them
34mEliminating Inconsistent Test Failures
02h 05mFrom slow to go: Rails test profiling hands-on
