Can you please let me know , if there is any other way to increase code coverage to 80 percent
without writing any junit or test cases for it. As there are lots of code so writing junit for all is very lengthy task , so if there is any metrics we can use to increase code coverage for our project.
Welcome to our community forum.
First thing, I would like to let you know that this is a community forum, and people here are users and SonarSourcers, who reply to the different (hundreds of) posts on their “free” time. Requesting a reply after only few hours is not a very good practice
May I ask you why you want to increase your code coverage to 80% ?
And last thing, I moved your post to “Get Help” and not “Report a bug” as there is no bug in your post description.
Hi @Carine_Bayon ,
Thanks for your reply. In our company as for the quality coding of project code metrics are set, so it is mandatory for us to have overall code coverage of 80 % so we are looking for another alternative to increase it.
to increase your code coverage, the suggestion is to write tests. It can be unit tests (easiest way) or other tests (Integration test, System tests) which may contribute to coverage when a tool can report coverage for these.
Hi @Carine_Bayon,
Thanks for your feedback.Can you also please confirm that scanning for entire project is happening in this case .Basically I want to know if there is any link between coverage and scanning , ie if coverage is 2 percent does that mean scanning will be also 2 percent.As I am aware ,but I need an official confirmation
Hi ,
Can any please let me know if there is any link between code coverage and scanning. How can we be assure that sonar qube is scanning our whole project.Your early response will be very helpful.