Loading…
Agile2014 has ended
Wednesday, July 30 • 10:45 - 12:00
Mutation Test - A New Way to Improve Code and Test (Joseph Yao) LIMITED

Sign up or log in to save this to your schedule, view media, leave feedback and see who's attending!

Limited Capacity seats available

Mutation test is a way to put a "mutation" into your code, run the test and then see if the test fails or not. A mutation is a change to production code which should make it behave in a different way. The idea is, if the production code is just enough to pass the test, any mutation should make the test failed due to the behaviour change. If test failure doesn't happen, we will say that the test can't kill this mutation. Therefore, some test code smell or production code smell exists, which possibly leads to some learning and improvement of our code and test.

By TDD, we should get "just enough" code that passing all the test. But, how do we know this? Sometimes, since writing test and code is so interactive in TDD, we may not choose the smallest baby step to pass the test. This means we may write some code which is not driven by current test (code smell). On the other side, we may even miss some important test or create some “weak” test by TDD because the code is too “obvious" to us (test smell). By applying Mutation test mindset and methodology, we can identify such code smell and test smell and then help us improve the quality of our code and test.

In this topic, I will first introduce what mutation test is and why we can use it to create some learning of and improve our code and test. Then, I will share a real code example in which I tried the mutation test and some learning I got. Finally, based on what I learned so far, I will have a summarisation about the code smell and test smell which can be detected by mutation test.

Speakers
avatar for Joseph Yao

Joseph Yao

Agile Coach, Odd-e
Joseph is an Odd-e Agile Coach and provides agile practice coaching and training for teams. He has more than 13 years’ development and project management experience in software industry, as well as, a broad knowledge in both internet (web & app) and desktop software development... Read More →



Wednesday July 30, 2014 10:45 - 12:00 EDT
Miami