Hi Ankit,
Welcome to the community
SonarCloud does not automatically calculate test coverage. You need to use an external tool, like Jacoco to produce a coverage report, which SC then imports. For some help, have a look here:
Hi Peeter,
Thanks for reply
As I have written test case like directly call API endpoint(s). So its not cover whole line of my code.
Written Test case like this.
As I mentioned, you need to set up the tool to produce code coverage yourself, then configure SonarCloud to read the report. Since it looks like you are using C# you might want to have a look at this post:
Yes, I follow that and generate code coverage of Unit Test in C#. But cant generate for Integration Test report. In my solution we wrote integration test cases for WEB Apis. So I need to generate that reports.