opencover

OpenCover MSBuild Integration - No results generated

女生的网名这么多〃 提交于 2019-12-01 19:02:27
After getting OpenCover to work on my machine, the next step is getting it to work with the build server. I've been trying to integrate OpenCover with MSBuild on a Bamboo Build Server. I have modified Build.proj as follows to run OpenCover after building the solution: <Target Name="TestAndCodeCoverage" DependsOnTargets="Build" > <Message Text="Executing Unit Tests and running OpenCover to check code coverage..." /> <MakeDir Directories="Coverage" /> <Exec Command='"C:\Program Files (x86)\OpenCover\OpenCover.Console.exe" -target:"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE

OpenCover/NUnit can't find PDB files

▼魔方 西西 提交于 2019-12-01 04:27:19
I'm using OpenCover http://nuget.org/packages/opencover and have written the following batch file to run the unit tests and generate code coverage stats: echo off echo *************************** echo *** Running NUnit tests *** echo *************************** "..\packages\OpenCover.4.0.804\OpenCover.Console.exe" -register:user -target:"..\NUnit 2.6\bin\nunit-console-x86.exe" -targetargs:"..\Web.UnitTests\bin\Debug\Web.UnitTests.dll" -output:coverage.xml echo ************************************** echo *** Generating coverage statistics *** echo ************************************** "..

What is the difference between using <DebugType>Full</DebugType> and <DebugType>Portable</DebugType> for .net core projects?

我们两清 提交于 2019-12-01 02:53:10
To generate open cover report I have to make debugType as Full. I generate report on build server as I have to fail the build if the coverage doesn't reach a certain threshold. The build is generated in Release mode. What consequence does keeping debugType Full in my csproj file have? Will it degrade the performance in production? The difference is that the "full" type emits a classic windows PDB symbol file which is complex and poorly documented. The "portable" PDB format is a new open-source format that can be created and used on all platforms. You can read more information on this format at

No Code Coverage Information for Tests Using Moles

家住魔仙堡 提交于 2019-11-28 14:48:02
I have been getting used to OpenCover over the past few days, and have I noticed that tests using Moles do not generate any Coverage information. I have created a small solution to isolate the problem, and have found that code coverage is generated only for tests that do not have the [HostType("Moles")] attribute. Reading around I have found this and this which seem to be NCover equivalents of my problem. They say that it is something to do with Moles running a profiler as well as the coverage tool, and that there is an environment variable CLRMONITOR_EXTERNAL_PROFILERS that can be set to

Display OpenCover results in TFS 2015 build Summary

我的梦境 提交于 2019-11-28 10:25:21
I have generated my xml coverage file as part of CI build on the TFS server using vNext 2015 build definition. How would one display the results in the TFS 2015 summary ? Either using the xml report or the html generated using the ReportGenerator. You need to convert the results produced by OpenCover to a format which can be parsed by TFS. One way to do this would be to use the OpenCoverToCoberturaConverter NuGet package. Once you have that, you can use the Publish Code Coverage Results build step. I have described the whole process on my blog . In “TFS 2015 - Update 2” this is possible by

No Code Coverage Information for Tests Using Moles

随声附和 提交于 2019-11-27 08:56:27
问题 I have been getting used to OpenCover over the past few days, and have I noticed that tests using Moles do not generate any Coverage information. I have created a small solution to isolate the problem, and have found that code coverage is generated only for tests that do not have the [HostType("Moles")] attribute. Reading around I have found this and this which seem to be NCover equivalents of my problem. They say that it is something to do with Moles running a profiler as well as the

xsi:type attribute messing up C# XML deserialization

萝らか妹 提交于 2019-11-26 23:38:19
问题 I used XSD.exe to automatically generate C# objects based on the XML schemas (.xsd files). I'm deserializing OpenCover output, but one of the partial classes didn't get generated correctly. Here's the line that's causing the exception: <MethodPoint xsi:type="SequencePoint" vc="0" uspid="1" ordinal="0" offset="0" sl="19" sc="9" el="19" ec="10" bec="0" bev="0" fileid="1" /> Here's a shortened version of the MethodPoint class: [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.0.30319