I installed Sonar and configured it to analyze our (.NET) projects (using Sonar-Runner). Everything works fine except for tests (MsTest). I googled around, spent quite some time just trying, but no success. Every time I launch a sonar, I see the same line in the output:
Gallio won't execute as there are no test projects
I even created a new solution with two projects:
TestProject => The "main" project has only 1 classTestProject.UnitTests => has some simple unit tests for a class in TestProject
In my sonar.properties file for the solution, I have the following line:
sonar.dotnet.visualstudio.testProjectPattern=*.UnitTests
Starting the analysis, everything works fine, and I get the result, except again: "no test projects were found."
In fact, I have tried many things with this property, but none of them have been successful. I also tried with direct access to the dll, with the property:
sonar.dotnet.test.assemblies=D:\\Projects\\TestProject\\TestProject.UnitTests\\bin\\Debug\\TestProject.UnitTests.dll
and some other ways (relative, etc.), but still: no test projects were found.
Does anyone have any experience with this and can help me solve this problem?
PS. When I run Gallio on it, it works, tests run, etc. Also, the correct path to Gallio is in Sonar properties.
Shatish
source share