This project has moved. For the latest updates, please go here.

Problems generating report

Aug 8, 2014 at 7:53 PM
Edited Aug 8, 2014 at 8:18 PM
Hey there-

I am having issues generating a report. I'm using OpenCover and then ReportGenerator immediately after. Here are my two commands (from PowerShell):
copy_all_assemblies_for_test $test_dir
create_directory $test_dir\TestResult
exec {
    & $source_dir\packages\OpenCover.4.5.2506\OpenCover.Console.exe -register:user "-target:$mstestPath\mstest.exe" "-targetargs:/noisolation /testcontainer:$test_dir\$projectName.Tests.dll /resultsfile:$test_dir\TestResult\$projectName.trx" -filter:"+[*]*" -mergebyhash -output:$test_dir\TestResult\$projectName.CoverageReport.xml

    & $source_dir\packages\ReportGenerator.\ReportGenerator.exe -reports:"$test_dir\TestResult\$projectName.CoverageReport.xml" -targetdir:"$test_dir\TestResult\CodeCoverage"
OpenCover generates a file perfectly and there is definitely coverage data in the resulting XML. However, when I feed this XML file to ReportGenerator, it merely shows 2 assemblies and no other information (i.e. classes, coverage, etc.).

copy_all_assemblies_for_test does it exactly what it says it does and copies all of the assemblies, pdb, config, etc files to a test directory.

Any ideas?

Aug 8, 2014 at 8:32 PM
Edited Aug 8, 2014 at 8:33 PM
Looks like it is working...

It must not like underscores... the name of my assembly (due to it being tokenized) is Company._ _ NAME _ _.Tests etc. As soon as it was replaced with something else, it worked.

Any ideas?
Aug 11, 2014 at 7:52 AM
Hi Josh,

could you provide me the coverage file? Then I can have a look at the problem.

Thanks, Daniel