In a previous post, we explored the PIT Mutation Testing Maven plugin. This time, we will take a look how we can integrate the results with SonarQube, our favorite software analysis tool.
You have consistently written unit tests and you have a line coverage of, let us say, 80% and all of your tests pass. Pretty good, isn’t it? But then you change your code and still all of your tests pass although you have changed code which is covered by your unit tests. In this post, we will take a look at mutation testing which will test the quality of your unit tests.
A few posts ago, we published a blog about how to use the Jira API. We did not write any unit tests for the application we wrote and that is exactly what we are going to do now. More specifically, we will focus on how we can unit test a Rest API.