SonarQube only shows what’s included in your coverage reports, so it’s a question of getting those things to show up in the report you feed into SonarQube.
You mean the validations are not covered/configured in the SonarQube report.
In my controller action method i have a validation like if the response have any errors i want to log the details. For that i have written test method but after committed the code still in the SonarQube report the validation part of action method is showing as code not covered.
Please suggest me how to write test methods for validation part of control action method