Killing Mutants with Mutation Testing | DevReach 2023
HTML-код
- Опубликовано: 23 авг 2024
- Who tests your unit tests? Even if a line of code is covered by a test, you're not guaranteed the test verifies anything. Enter mutation testing: the practice of inserting "mutant" bugs into your code and checking whether any tests catch them.
This hands-on talk by Josh Goldberg walks you through real-world code issues detectable with mutation testing, how mutation testing catches them, and how to get started with it locally.
In it, he covers:
* Where unit testing coverage does or does not act as an effective measure of behavioral coverage
* Common types of bugs and developer mishaps
* How mutation testing works at a theoretical level (AST analysis, mutators, and strategies for efficient re-testing)
* Running mutation testing on an example TypeScript repository
* Integrating mutation testing both into technical needs (i.e. CI/builds) and interpersonal (e.g. team culture)
* Creating our own custom mutators for business-specific use cases
* Where mutation testing does not catch code slipups and/or can be augmented with other forms of static or dynamic analysis
---
Josh Goldberg is a frontend developer with a passion for open source, static analysis, and the web. IHe's a full-time open source maintainer and work on projects in the TypeScript ecosystem such as typescript-eslint and TypeStat. He's also the author of the Learning TypeScript book, published by O'Reilly.
---
Follow us on social to stay up to date with DevReach news!
🐦 Twitter: @DevReach / / devreach
👥 Facebook: DevReach / / devreach
➡️ LinkedIn: / devreach-2023
🐦Follow Josh @JoshuaKGoldberg