Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
Tests are often slow and are a bottleneck in development. We build complex CI systems with heavy parallelization to reduce the amount of time it takes to run all the tests, but we still tend to run all of them even for the slightest change in code. What if instead, we could run only the tests that might fail as a result of our changes? In a world of static languages, it's not hard, but Ruby is very flexible and dynamic language so implementing this idea is tricky. Meet Crystalball (https://toptal.github.io/crystalball/) - a regression test selection library we built in Toptal. I'll demonstrate how to use it with RSpec, how it predicts what tests to run and how it can be extended. RubyKaigi 2019 https://rubykaigi.org/2019/presentations/p0deje.html#apr19
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 this presentation at RubyKaigi 2019, Alex Rodionov discusses Crystalball, a regression test selection library designed to optimize test running in Ruby applications. Alex begins by addressing the common problem of lengthy test suites that can slow down the development process, particularly when making minor code changes that require all tests to be rerun. He highlights the frustration within the Ruby community of running extensive test suites due to Ruby's dynamic characteristics that complicate static analysis. Key Points Discussed: - **Introduction to the Problem**: Alex describes issues with regression testing where integrated tests cause a situation where even minor changes necessitate running all tests. This approach wastes time, especially in larger codebases where tests can take multiple minutes to complete. - **The Genesis of Crystalball**: Alex shares how ideas from a blog post by Aaron Patterson led to the inception of Crystalball, which intelligently predicts which tests need to run based on changes made in a Git repository. - **How Crystalball Works**: The tool operates using a three-part system: - **Map Generator**: It creates a map linking tests to the code they utilize based on test execution and coverage. - **Predictor**: It assesses changes in the Git repository to determine affected tests and run only those tests. - **Runner**: It executes the selected tests using RSpec. - **Demonstration**: During the demo, Alex shows how Crystalball identifies tests to run after making changes in a simple Rails application. Multiple strategies like coverage data, allocated objects, and parsing methods are employed to ensure accurate predictions. - **Strategies for Improvement**: Crystalball supports additional tailored strategies targeting specific use cases, such as tracking modifications in Factory Bot and ActionView, among others. Conclusion and Takeaways: - Crystalball offers a practical solution to the regression testing pain points in Ruby, enabling developers to run only necessary tests and significantly reducing wait times. - Alex emphasizes the growth of this open-source tool and encourages the Ruby community to explore its full potential, providing links to resources for further information. - The session concludes with an invitation for questions, demonstrating a commitment to engaging with attendees and facilitating discussions about test optimization in Ruby development.
Suggest modifications
Cancel