我正在使用6.1版本的sonarqube,并且已经将我的azure CI build集成了sonarqube扫描任务。我也想计算代码覆盖率,因此我在CI构建中添加了VsTest
任务(如sonarqube-vsts集成文档中所述)。
当构建排队时,我在VsTest
任务中遇到错误。 (所有其他声纳任务运行正常)
错误如下:
Error: The process ‘C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe’ failed with exit code 1
VsTest task failed.
请让我知道如何解决此问题。我正在使用的构建服务器上装有VS2017。
这是日志:
Total tests: 14. Passed: 8. Failed: 6. Skipped: 0.
Test Run Failed.
Test execution time: 41.8253 Seconds
Results File: D:\VSTS Agent Folder\SO\41\s\TestResults\SC-DEOPSCI_MEA-DEVOPS1_2019-09-09_11_14_11.trx
##[warning]Vstest failed with error. Check logs for failures. There might be failed tests.
##[error]Error: The process 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe' failed with exit code 1
##[error]VsTest task failed.
Publishing test results to test run '1000042'
Test results remaining: 14. Test run id: 1000042
##[section]Async Command Start: Publish test results
Published Test Run : https://xyz.visualstudio.com/TipB/_TestManagement/Runs?runId=1000042&_a=runCharts
##[section]Async Command End: Publish test results
##[section]Finishing: VsTest - testAssemblies