Not covered by tests SonarQube
What you will learn here about SonarQube
- Not covered by tests SonarQube
On the SonarQube one of most common issue is not covered by tests. SonarQube example of not covered by tests is given below. So here we will see how to solve not covered by tests SonarQube issue.
Why do I get not covered by tests issue?
You get this issue for code lines because those lines of code are not covered by your test cases. If you don’t want not covered by tests issue then your test case data or inputs such way that it will cover all the lines of code you have written.
Not covered by tests SonarQube
1)You will get not covered by tests issue when your test data is not covering your entire code. Basically if few lines of code is not getting executed when you run the test case then you will get not covered by test issue for those lines which is shown below.
2)If you don’t want to get not covered by tests then one simple thing that you have to do is just pass test data such way that it will cover all the lines of code which is shown below.