Learn Backend Development Part-Time, Online
Learn the Skills Netflix, Meta, and Capital One Actually Hire For
Overview
Google, IBM & Meta Certificates – 40% Off
One Coursera Plus subscription covers most Professional Certificates on Coursera.
Unlock All Certificates
This talk shows how to profile and reduce database calls that slow Rails test suites. It covers factory and test setup patterns that create unnecessary data, along with techniques for tracing and fixing those hotspots.
Syllabus
Intro
Negative effects of slow tests
Expensive things in tests
The testing pyramid
Avoid persisting data
Locations
Shared test setup
Tests with too much data
Tests with wrong data
Solution: Inline setup
Factories that do too much
Compounding factories
Minimal factory
Extend base with traits
Callbacks that create more data
Broken data
Updating in setup
Profiling factories
Diagramming
Organization
Diamond factories
Avoid creating extra data
Debugging techniques
Joel Quenneville
Taught by
Ruby Central