0

I have created a TFS2013 Build Definition using the template TfvcTemplate.12.xaml

I have specified a test run using VSTestRunner and enabled code coverage.

I am integrating this build with sonar analysis by specifying pre-build and post-test execution script.

Prebuild script arguments: begin /name:PrjName /key:PrjKey /version:1.0 /d:sonar.cs.vstest.reportsPaths="tst*.trx"

I have the "Unit Test Coverage" widget on my sonar dashboard.

It shows Unit Test Coverage %

However, it does not show the unit tests (ie how many tests were run, how many failed ,etc).

I looked in the build output. There is a "tst" folder, however it is empty. I cannot find the trx files.

I believe that either the trx files are not properly generated or I am not setting the "sonar.cs.vstest.reportsPaths" correctly.

Please help !!

Ramya
  • 21
  • 3

1 Answers1

0

Relative paths are not well supported: Specify an absolute path wildcard to your *.trx reports. See https://jira.sonarsource.com/browse/SONARMSBRU-100 for details on the bug.

Note that you probably can use the TFS 2013 environment variables to construct this absolute path wildcard: https://msdn.microsoft.com/en-us/library/hh850448.aspx#env_vars

Dinesh Bolkensteyn
  • 2,971
  • 1
  • 17
  • 20