Bas Dijkstra

Test automation trainer

Company: On Test Automation

Stream: В

Time: 12:00 - 12:45

Country: Netherlands

Language: English

Talk: Mutation testing for fun and profit - Improving the quality of your unit tests

About Speaker

Hey, my name is Bas Dijkstra, and I am an independent test automation consultant and trainer. I have been active in the test automation field for some 16 years now, and have worked on software testing and automation solutions across a wide range of programming languages, frameworks and technology stacks. I’ve delivered test automation training to dozens of companies and hundreds of conference attendees in the Netherlands as well as abroad, to excellent reviews. I live in Amersfoort, The Netherlands, together with my wife and two sons. When I am not at work, I like to go outside for a long run, or to sit down and read a good book.

Talk: Mutation testing for fun and profit - Improving the quality of your unit tests

In this talk, I will show the participants the principles behind mutation testing, and how it can help them get better insight into the quality of their automated (unit) test suite. Challenges A lot of development teams write unit tests to check that their code behaves as intended. However, the quality of these unit tests is unfortunately often underappreciated. If any attention is paid to unit test quality at all, it is typically done in terms of code coverage, which, as attendees will see from examples I'm using in the talk, is a flawed metric. Yet, teams rely on the results of these unit tests in their software development lifecycle. Isn't there a better way to get information about the quality of our unit tests? What's covered in the talk In this talk, participants will get a practical introduction to mutation testing and how this technique can be used to get better insight into the quality of their unit tests. I will start with some theory on: · The flaws of code coverage as a quality metric · The concepts of false positives and false negatives · The underlying concepts of mutation testing and how it tries to address the above issues After this, I will conduct a live demo of mutation testing, covering: How to add mutation testing to an existing set of unit tests This will cover adding PITest to an existing (Maven-based) Java codebase, consisting of some application code that implement functions for a hypothetical online banking system, as well as a set of unit tests that are used to document the application code and check the correctness of its behaviour. How to run a mutation testing tool and interpret the results This introduces the attendees to running PITest, checking the results (as well as how these results can make a build pass or fail) and interpreting the suggestions made by PITest in the reports. How to improve the existing set of unit tests for better mutation testing scores This final step is meant to show attendees how to improve their unit tests based on the results produced by mutation testing and how this improves their mutation testing score. This ties together all the concepts they have seen so far. Practical information The live demo part of the talk is done using PITest ( and Java. All code I will use will be made publicly available on GitHub, so attendees can try it out for themselves after the talk.