Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
RubyConf2019 - Kill All Mutants! (Intro to Mutation Testing) by Dave Aronson How good are your tests? Would they still pass if the tested code was changed much? If so, you may have a problem! Mutation testing helps reveal these cases. It runs your unit tests, using many slightly altered versions of each method, called "mutants". If a mutant passes (or "survives") all of the method's tests, that implies certain flaws in your code, your tests, or both! Come find out how to use this advanced technique to discover problems lurking in your code and/or tests. #rubyconf2019 #confreaks
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 titled "Kill All Mutants! (Intro to Mutation Testing)" delivered at RubyConf 2019, Dave Aronson introduces the concept of mutation testing as a powerful software testing technique aimed at improving the effectiveness of unit tests. Mutation testing involves creating slight variations of code, known as ‘mutants,’ and running existing tests against them. The main purpose is to identify gaps in the test suite and ensure that any meaningful changes in the code are detected by appropriate tests. The key points covered in this talk include: - **Definition and Objective of Mutation Testing:** Mutation testing assesses code quality by checking if tests can detect introduced faults. A test suite's inadequacy is exposed if mutants can pass without triggering failures, indicating potential flaws in either code or tests. - **How Mutation Testing Works:** Tools create mutants by altering code in various ways and running tests to identify failures. If tests fail for a mutant, it is considered 'killed,' indicating effective tests and meaningful code. - **Benefits:** It ensures that tests are strict and the code is meaningful. By revealing weaknesses in both code and tests, it encourages improving test coverage and code quality. - **Drawbacks:** Mutation testing can be CPU-intensive, slow, and challenging to interpret, especially regarding the meaning behind the results. It is not beginner-friendly, as understanding the implications of surviving mutants can be complex. - **Examples:** Aronson shares specific examples, such as mutant alterations in a mathematical method to demonstrate how surviving mutants indicate poor test coverage. Another example illustrates redundant code, prompting the need for more extensive tests to evaluate loop behavior correctly. - **Popular Tools:** For Ruby, the main tool mentioned is 'Mutant,' which has transitioned to a closed-source model, while alternatives like 'MuTest' and 'Haeckel' were also touched upon. In conclusion, Aronson emphasizes that mutation testing is not a foolproof solution but a valuable technique for developers to improve code quality and test robustness. Practitioners are encouraged to experiment with mutation testing to enhance their practices, keeping in mind the associated challenges.
Suggest modifications
Cancel