Talks
Speakers
Events
Topics
Search
Sign in
Search
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
search talks for
⏎
Suggest modification to this talk
Title
Description
RailsConf 2017: How to Write Better Code Using Mutation Testing by John Backus Mutation testing is a silver bullet for assessing test quality. Mutation testing will help you: Write better tests Produce more robust code that better handles edge cases Reveal what parts of your legacy application are most likely to break before you dive in to make new changes Learn about features in Ruby and your dependencies that you didn’t previously know about This talk assumes a basic knowledge of Ruby and testing. The examples in this talk will almost certainly teach you something new about Ruby!
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 "How to Write Better Code Using Mutation Testing" delivered by John Backus at RailsConf 2017, the speaker discusses the concept of mutation testing and its benefits for improving code quality and test effectiveness. Mutation testing involves modifying code to assess whether existing tests can detect the changes, thereby providing insights into the robustness of test cases. Key Points Discussed: - **Introduction to Mutation Testing**: Mutation testing serves as a powerful method for evaluating test quality by asking how much code can be changed without the tests failing, contrasting traditional line coverage metrics. - **Manual vs. Automated Mutation Testing**: Backus demonstrates manual mutation testing using a sample `gluttons` class to illustrate how little modifications go undetected by tests, making the case for automated tools like "mutants" and "new tests" that streamline this process. - **Detecting Dead Code**: The speaker emphasizes how mutation testing can help in identifying dead or redundant code within a project, enhancing overall code cleanliness. - **Understanding Ruby Features**: Through various code samples, Backus shows how mutation testing can help developers discover Ruby features and behavioral quirks within their dependencies, leading to better coding practices and fewer bugs. - **Enhancing Tests for Edge Cases**: Mutation testing serves to uncover gaps in existing tests, ensuring that edge cases are adequately covered—this is particularly useful for legacy code where test documentation may be lacking. - **Practical Implementation**: The speaker concludes by discussing how developers can integrate mutation testing into their workflow, enhancing their knowledge of Ruby, improving test coverage, and ultimately shipping more reliable code. Backus mentions that achieving 100% mutation coverage is not necessary; even partial coverage can yield significant benefits. Conclusion: Backus advocates for adopting mutation testing in daily coding practices, stating that it fosters a deeper understanding of Ruby and enhances the quality of code being delivered. By using mutation testing to preview the impact of code changes, developers can minimize the risk of introducing bugs into their systems. As a final note, he encourages attendees to explore job opportunities at Cognito, emphasizing a culture of writing better code through advanced testing techniques.
Suggest modifications
Cancel