Skip to content
This repository has been archived by the owner on Nov 15, 2021. It is now read-only.

mergeoutput and coverbytest causes duplicated TrackedMethod uids #715

Open
6 of 24 tasks
jswolf19 opened this issue May 24, 2017 · 0 comments
Open
6 of 24 tasks

mergeoutput and coverbytest causes duplicated TrackedMethod uids #715

jswolf19 opened this issue May 24, 2017 · 0 comments

Comments

@jswolf19
Copy link
Contributor

jswolf19 commented May 24, 2017

When merging multiple results using mergeoutput, if coverbytest is also specified, then the output TrackedMethod elements from each run start with a uid of 1. This causes the uid in the TrackedMethodRef elements to be ambiguous.

This also causes ReportGenerator to crash when reading the resulting report file.

My Framework

  • .NET 2
  • .NET 3.5
  • .NET 4
  • .NET 4.5
  • .NET 4.6
  • .NET 4.6.1
  • .NET 4.6.2
  • .NET Core 1.0.0
  • Something else

My Environment

  • Windows 7 or below (not truly supported due to EOL)
  • Windows 8
  • Windows 8.1
  • Windows 10
  • Windows 10 IoT Core
  • Windows Server 2012
  • Windows Server 2012 R2
  • Windows Server 2016

I have already...

  • repeated the problem using the latest stable release of OpenCover.
  • reviewed the usage guide and usage document.
  • have looked at the opencover output xml file in an attempt to resolve the issue.
  • reviewed the current issues to check that the issue isn't already known.

My issue is related to (check only those which apply):

  • no coverage being recorded
  • 32 or 64 bit support
  • feature request

Expected Behavior

The TrackedMethod uid should be unique in a manner similar to the SequencePoint uspid and File uid.

Actual Behavior

The TrackedMethod uid sequence begins at 1 with each run.

Steps to reproduce the problem:

  1. Run opencover two or more times using mergeoutput to merge the results into a single xml file as follows:
"%OpenCoverPath%\OpenCover.Console.exe" -register:Path32 -mergebyhash -mergeoutput -target:"%XUnitPath%\xunit.console.clr4.x86.exe" -targetargs:"ATest.dll" -coverbytest:"*ATest.dll" -targetdir:ATest\bin\x86\Debug
"%OpenCoverPath%\OpenCover.Console.exe" -register:Path32 -mergebyhash -mergeoutput -target:"%XUnitPath%\xunit.console.clr4.x86.exe" -targetargs:"BTest.dll" -coverbytest:"*BTest.dll" -targetdir:BTest\bin\x86\Debug
  1. Open results.xml. Module ATest's TrackedMethods and Module BTest's TrackedMethods will both start with a uid of 1.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants