VSTS SonarQube cannot find TRX file

吃可爱长大的小学妹 提交于 2019-12-06 12:23:09

问题


I am using Visual Studio Team Services to carry out an automated build, and using SonarQube to display Code Quality, Coverage, etc. I am also using a privately hosted build agent.

The build steps all work successfully with data being processed and populated through to SonarQube which is great. However, no code coverage is being displayed in SonarQube. After looking through the logs in VSTS I found that SonarQube is looking for the .trx file (which contains code coverage) in a different directory to the one that VSTS publishes the .trx file to.

So when VSTS builds the solution it creates the test results file here: C:\agent_work\3\s\TestResults

But SonarQube is trying to use test results from here: C:\agent_work\3\TestResults

On the build server, if I manually copy the .trx file into the correct location and then run the build again, the code coverage all works fine and processes through to SonarQube. So the issue is definitely the mismatch of the locations where the .trx is published and where it is to be picked up form.

I can't find a way of changing the publish location, or the SonarQube source location.

Please help!


回答1:


This is a known issue, and will be fixed by the next release. See: https://jira.sonarsource.com/browse/SONARMSBRU-262.

We just announced the RC versions of the products that have this fix, you can give them a try. See this thread.



来源:https://stackoverflow.com/questions/40019110/vsts-sonarqube-cannot-find-trx-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!