Is mutation testing useful in practice?

前端 未结 8 546
情歌与酒
情歌与酒 2020-12-24 11:08

Do you have any examples of real life applications of mutation testing? Does it work better than simple test coverage tools? Or is it useless?

What are the advantage

8条回答
  •  [愿得一人]
    2020-12-24 11:35

    The usefulness of unit tests is no longer discussed. They are essential in conception of a quality application. But, how can we assess their relevance? A code coverage indicator up to 100% doesn’t mean the code is 100% tested. This is just a view of executed code during unit tests execution. Mutation testing will allow you to have more confidence in your tests.

    This is a two step process:

    1. Generate mutants.
    2. Check that the mutations are found by the tests.

    I wrote a entire article about this process, including some concrete cases.

提交回复
热议问题