Code Coverage for DB Unit Test Cases Written in .Net (MS TestCases)

  • Sonar Version - 8.9.7
  • We have .Net SQL Project which contains unit test cases for DB Objects written in .Net(MS Tests) using below packages -
    Microsoft.VisualStudio.CodeCoverage.Shim,
    Microsoft.VisualStudio.QualityTools.UnitTestFramework,
    Microsoft.SqlServer.Dac,
    Microsoft.Data.Tools.Utilities
    Microsoft.Data.Tools.Schema.Sql.UnitTesting
  • Our Objective is to get code coverage of DB objects covered under the unit test cases.

We have Teamcity tool for deployment in which we have configured the sonar, here trx report get generated but can’t see any coverage on SonarQube.
Test Cases and Code smells are available there.

Thanks

Hi,

Your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

8.9.7 → 9.9.1 → 10.1 (last step optional)

You may find these resources helpful:

If you have questions about upgrading, feel free to open a new thread for that here.

If your error persists after upgrade, please come back to us.

Hi,

If you update to a more recent version you’ll see the new documentation we’ve added that might help :wink:

Tom

Since upgradation is not within our scope, Can I request you to share some templates to get coverage for DB Unit test cases written in .Net?