我们有一个 .NET C# 解决方案,其中包含一些首次集成测试,但没有单元测试。我必须如何配置 sonar-project.properties 才能使测试执行和代码覆盖率正常工作?使用时:
sonar.dotnet.visualstudio.testProjectPattern=*.Tests;*.Test
sonar.dotnet.visualstudio.itProjectPattern=*.IntegrationTest
sonar.opencover.installDirectory=C:/Program Files/OpenCover
sonar.gallio.coverage.tool=OpenCover
sonar.gallio.runner=IsolatedProcess
sonar.gallio.it.mode=active
声纳 说:
14:42:55.813 INFO p.d.a.m.ModelFactory - The project 'foo.IntegrationTest' has been qualified as a test project.
14:42:55.844 INFO p.d.a.m.ModelFactory - The project 'bar.IntegrationTest' has been qualified as a test project.
...
Gallio won't execute as there are no test projects
更改测试模式时:
sonar.dotnet.visualstudio.testProjectPattern=*.IntegrationTest
#sonar.dotnet.visualstudio.itProjectPattern=*.IntegrationTest
Gallio 将集成测试作为“单元测试”执行,并且代码覆盖率有效。有什么提示吗?