SonarCloud includes NUnit.Framework in test coverage but not Microsoft.VisualStudio.TestTools.UnitTesting

SonarCloud includes NUnit.Framework in test coverage but not Microsoft.VisualStudio.TestTools.UnitTesting.

I have reviewed the settings in Azure Pipelines and found that Visual Studio Test is included. Code coverage enabled is checked, and so is Upload test attachments. I notice that when I manually run coverage from Visual Studio Enterprise Edition, that it shows a higher coverage result than Sonar Cloud does.

What should I check next?

@mickaelcaro Do you have any suggestions of what I should look at next? PR’s with Microsoft.VisualStudio.TestTools.UnitTesting tests shown 0 test coverage. PR’s with nUnit test show the correct coverage.

@LuisM Do you have any suggestions of what I should look at next?

Hi @p97

What is your current pipeline setting ?

Please note that you will have to choose one or the other to be shown on SonarCloud, you cannot mix 2 different sources of test coverage.

1 Like

Does this mean that we need to have everyone use Nunit or MS test because if some use MS Test and some use nunit then we cannot get the sum both? right?

Exact yes.

Thank you.

How do I determine weather the report is on the nunit or the ms tests? How do I switch between them?

Our Architects agree that we should use only one testing framework on this repo.

I opened a different thread for how to get a specific framework tests reported

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.