Pre*_*hts 5 unit-testing sonar-runner sonarqube
我们在 TFS (2010) 团队构建上运行 SonarQube(5.0.1) 和 sonar.net-runner。
FxCop 工作正常,一切运行完美,我在声纳中看到了所有问题。
但是,当我尝试在声纳中提取测试结果时,我遇到了问题。
当我将该属性设置为sonar.cs.vstest.reportsPaths文件的绝对文件时trx,它会将我的测试结果发布到声纳。太好了。
但是当我使用通配符时,我的测试结果不会在声纳中发布。不太好
我试过的配置。
#1
sonar.cs.vstest.reportsPaths=E:/Builds/1/74/TestResults/*.trx
#2
sonar.cs.vstest.reportsPaths=TestResults/*.trx
#3
sonar.cs.vstest.reportsPaths=**/*.trx
#4
sonar.cs.vstest.reportsPaths=.**/*.trx
Run Code Online (Sandbox Code Playgroud)
完整配置
# ----- Project identification
sonar.projectVersion=2.6.0.0914
sonar.projectName=MySolution
sonar.projectKey=Company:MySolution
# ----- Use UTF-8 encoding, otherwise analysis is unable to read files
sonar.sourceEncoding=UTF-8
# ----- Visual studio bootstrapper
# Enable the Visual Studio bootstrapper
sonar.visualstudio.enable=true
#Define the solution to run sonar against
sonar.visualstudio.solution=MySolution.sln
#Specify the pattern of the test projects
sonar.visualstudio.testProjectPattern=.*Test*.
#We are using custom output paths.
sonar.visualstudio.outputPaths=E:/Builds/1/74/Binaries
# ----- FxCop
sonar.cs.fxcop.aspnet=false
sonar.cs.fxcop.fxCopCmdPath=D:/Sonar.NET/FxCop/FxCopCmd.exe
# ----- Unit Test Results
sonar.cs.vstest.reportsPaths=.**/*.trx.
# This property is set because it is required by the SonarQube Runner.
# But it is not taken into account because the location of the source
# code is retrieved from the .sln and .csproj files.
sonar.sources=.
Run Code Online (Sandbox Code Playgroud)
当我指定完整文件名时,它可以工作。例如,sonar.cs.vstest.reportsPaths=C:/MyTestSoln/TestResults/MyTest.trx
但当我尝试“sonar.cs.vstest.reportsPaths=TestResults/*.trx”时它不起作用
| 归档时间: |
|
| 查看次数: |
3199 次 |
| 最近记录: |