Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
Recorded in June 2018 during https://2018.rubyparis.org in Paris. More talks at https://goo.gl/8egyWi
Date
Summarized using AI?
If this talk's summary was generated by AI, please check this box. A "Summarized using AI" badge will be displayed in the summary tab to indicate that the summary was generated using AI.
Show "Summarized using AI" badge on summary page
Summary
Markdown supported
In his talk titled "99 Problems of Slow Tests," Vladimir Dementyev discusses the critical issue of slow test suites that can hinder development efficiency. Recorded at the Paris.rb Conf 2018, he shares insights drawn from his experiences and introduces several approaches to optimize test performance. Key points discussed during the talk include: - **Introduction and Context:** Vladimir introduces himself, mentioning his experience with long CI build times during his work on Fontan.com, where the test suite ran for half an hour with less than 2200 tests per minute. - **Optimizing Test Suites:** Emphasizing the importance of improving test performance, he presents his solution: TestProbe, a toolset designed for analyzing and optimizing test suite performance. - **Common Problems and Solutions:** - **Misconfigured Environments:** Poor configurations in test environments can slow down tests. Tools like RubyProf and StackProf can help diagnose configuration issues. - **Database Cleaner Usage:** The necessity of a database cleaner can be diminished in newer Rails versions. By analyzing test performance, he identified instances where removing the database cleaner sped up tests by 30%. - **Handling Inline Jobs:** Disabling inline job processing for irrelevant tests can reduce runtime significantly. - **Monitoring Method Calls:** Be aware of how libraries like PaperTrail can add overhead. Disabling unnecessary versioning in tests improved speed. - **Factory Setup Optimization:** Using tools like FactoryDoctor helps developers avoid costly mistakes with test data creation and highlights inefficiencies from FactoryCascade phenomena. - **Reducing Repetitive Setup Work:** Streamlining setup processes through shared setups and utilizing tools like `let` to minimize repeated work can enhance performance. - **Utilizing Fixtures Effectively:** Shared fixture data can reduce test durations significantly by minimizing repeated data generation. - **Continuous Performance Monitoring:** Ongoing assessment of test performance aids in averting slowdowns during development, particularly in CI/CD workflows. **Conclusions:** In conclusion, Vladimir’s talk provides numerous actionable insights on how to identify and fix common pitfalls that lead to slow test performance. Key takeaways include the necessity of careful configuration of testing environments, the strategic use of tools for debugging and streamlining factory setups, as well as a mindful approach to assertions and data handling in tests. The overarching message emphasizes the importance of maintaining solid performance metrics to enhance development workflows.
Suggest modifications
Cancel