Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
High Cost Tests and High Value Tests by Noel Rappin There is a value in writing tests and there is also a cost. The currency is time. The trade-offs are difficult to evaluate because the cost and value are often seen by different people. The writer of the test bears much of the short term cost while long term benefits and cost are borne by the rest of the team. By planning around both the the cost and value of your tests, you’ll improve your tests and your code. How much do slow tests cost? When is it worth it to test an edge case? How can you tell if testing is helping? Here are some strategies to improve your tests and code.
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 the talk "High Cost Tests and High Value Tests," presented by Noel Rappin at RubyConf 2017, the focus is on the nuanced balance of costs and benefits associated with writing tests in software development. Rappin emphasizes that while writing tests incurs a time cost, the long-term benefits can significantly improve code quality and reduce future development time. Key Points Discussed: - **Testing Approaches**: Rappin explores different strategies for testing, such as Test-Driven Development (TDD) using RSpec and Rails' suggested approach of writing tests after developing the code. He notes that developers often vary in their practices regarding running tests locally versus using continuous integration servers, which affects overall testing efficiency. - **Measuring Cost and Value**: He proposes using time as a metric to evaluate the cost and value of testing practices. While tests save time through improved code design and bug detection, they also require time for writing, running, understanding, and fixing. - **Types of Testing**: The talk categorizes tests into three types: - **Capybara Integration Tests**: Simulate user interaction, slower to run but valuable for end-to-end testing. - **Workflow Tests**: Maintain application logic efficiency, checking parameters and database conditions, which run much faster. - **Unit Tests**: Focus on individual methods; they are the fastest to run. - **Practical Examples**: Rappin shares insights from two projects he worked on. In one, despite having fewer tests, the integration tests were considerably slower and took up a significant portion of runtime. In a longer-existing project, he noted an imbalance of test types, emphasizing the overall need to optimize testing strategies. - **Strategic Recommendations**: Rappin suggests a more strategic approach to writing tests, advocating for writing fewer, high-value tests (like unit tests) and observing the broader development context when deciding on test types. He emphasizes the importance of continually assessing the necessity of tests and encourages deleting or re-evaluating less effective tests to maintain efficiency. In conclusion, Rappin stresses that there’s no one-size-fits-all solution for testing, and strategies should be tailored to individual contexts for optimal outcomes. The balance between time spent writing tests and the benefits gained through improved code quality is essential to fostering more efficient software development processes.
Suggest modifications
Cancel