Is mutation testing useful in practice?

前端 未结 8 566
情歌与酒
情歌与酒 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:30

    The test case for the first one behaves differently due to above mutation there is an exception raised now. So it doesn’t returns the expected array of {6,3}. However, our second test case remains same, because it also includes positive number. So, it gives exception on positive numbers as well. Now, if we have to write a successful test case that would be Input ={-6,-6,-7,-3,-4} Expected = {-6,-3}

提交回复
热议问题