YoVDO

Your Test Suite Is Making Too Many Database Calls

Offered By: Ruby Central via YouTube

Tags

RailsConf Courses Ruby on Rails Courses Code Efficiency Courses

Course Description

Overview

Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Discover strategies to optimize your test suite's performance in this RailsConf 2022 talk. Learn how to identify and reduce excessive database calls, profile and fix performance hot spots, and create visual diagrams for better understanding. Explore techniques to write query-resistant code, avoid persisting unnecessary data, and streamline shared test setups. Gain insights into improving factory designs, minimizing data creation, and implementing effective debugging methods. Master the art of balancing the testing pyramid and crafting minimal, extensible factories with traits. Equip yourself with the knowledge to significantly reduce build times and enhance overall test suite efficiency.

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

Related Courses

Web Application Architectures
University of New Mexico via Coursera
Full Stack Foundations
Udacity
Rails with Active Record and Action Pack
Johns Hopkins University via Coursera
Ruby on Rails: An Introduction
Johns Hopkins University via Coursera
Ruby on Rails Web Services and Integration with MongoDB
Johns Hopkins University via Coursera