0

I have some problems getting the code coverage .coverage file generated in nightly build.

What I have: I've configured my build to use a .runsettings file and Type of run settings : CodeCoverageEnabled

The build is correctly running all the required unit tests and measuring the code coverage, using only a selected number of assemblies (specified in the .runsettings file).

In the build report, within VS2013, I can manually export the code coverage file (a .coverage file).

What I need: I would need to configure the build to automatically generate that .coverage file in a target folder.

How do I do that?

Lorenzo Santoro
  • 464
  • 1
  • 6
  • 16

1 Answers1

0

The .coverage file is present as a part of the test results. You can use the .runsettings to set a outputpath for the test results

<ResultsDirectory>c:\\TestResults</ResultsDirectory>

The .coverage file will be present in a subfolder within the results directory.

If you want to push it to another location you can do that via a post-build script in your nightly's build process template.

allen
  • 4,627
  • 1
  • 22
  • 33
  • I tried this: c:\TestOutputFolder But the c:\TestOutputFolder contains only the stuff required to run the tests, and not the result. Did I miss something ? – Lorenzo Santoro Jun 11 '15 at 11:47