opencover

Opencover with multiple assemblies

Deadly 提交于 2020-01-12 12:48:25
问题 I am trying to combine three unit testing projects (three different dlls) into one OpenCover report. Is it possible? I tried to look into filters but I don't see enough detail (examples) in the OpenCover Wiki site. Can someone shed some lights on where I can start? Thanks a lot! 回答1: Yes it is possible. If you are using nunit (or some other test runner) you can (usually) run all test assemblies at the same time e.g. opencover.console.exe -register:user "-target:nunit-console.exe" "-targetargs

OpenCover MSBuild Integration - No results generated

时光毁灭记忆、已成空白 提交于 2020-01-11 09:21:51
问题 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)

sonar with gallio and opencover, code coverage: 0%

試著忘記壹切 提交于 2020-01-06 06:47:20
问题 I'm using sonar to check my c# project. I would like to measure code coverage that's why i installed gallio and opencover. When I run soner-runner everything works fine, my unit test is performed, ... but the code coverage is 0% on the sonar web UI. do you know the reason why the code coverage is 0%? My solution, project and classes: (S) SonarTestSolution (P) ClassLibrary1 (C) Class1.cs (P) ClassLibrary1NUnitTest (C) Class1NUnitTest.cs content of Class1.cs: public class Class1 { public String

OpenCover takes much longer to run than the nunit-console

倖福魔咒の 提交于 2020-01-04 09:03:59
问题 I'm trying to add unit tests to this project: https://github.com/JimBobSquarePants/ImageProcessor When running the unit tests, they take maybe 1 or 2 minutes to run (it's an image processing library, and I don't expect them to be insanely fast). The problem is that when I run OpenCover over these tests, they take something like 20 minutes to run. The gist of the current unit tests is that there are a bunch of test images, and each unit test (more like integration tests, actually) reads each

transform opencover xml output to ncover xml

微笑、不失礼 提交于 2020-01-04 04:19:06
问题 I need the ability to import opencover coverage results in to Jenkins to pull coverage trending data over time. It appears that the best way to do this is going to be finding a way to convert the opencover xml format to ncover format, and then use the NCover plugin to import the results. Is there an existing xslt that will transform opencover to ncover, or an open source tool that will do the conversion? I've searched, and I'm finding nothing. thanks 回答1: The following XSLT is available on

Unexpected token '' at position 3 in selection expression

北城余情 提交于 2019-12-24 08:06:43
问题 I am executing a batch script in Jenkins Job. C:\Users\Administrator\AppData\Local\Apps\OpenCover\OpenCover.Console.exe "-target:C:\Program Files (x86)\NUnit.org\nunit-console\nunit3-console.exe" "-targetargs:C:\Test\src\Example.Tests\bin\Debug\example.Tests.dll --where "cat == Unit" -register:Administrator I used Filter as well but no use. C:\Users\Administrator\AppData\Local\Apps\OpenCover\OpenCover.Console.exe "-target:C:\Program Files (x86)\NUnit.org\nunit-console\nunit3-console.exe" "

How to get OpenCover to look at local bin\Debug folder for PDBs not GAC

左心房为你撑大大i 提交于 2019-12-24 07:45:11
问题 I am using OpenCover 4.7.922 with nUnit console runner 3.10.0. I have a myproj.tests project which tests myproj . After building, myproj.tests\bin\debug contains myproj.tests.dll , myproj.tests.pdb , myproj.dll , myproj.pdb . myproj is registered in the GAC. I am calling OpenCover like so: OpenCover.Console.exe -output:opencover.xml -register:user -target:"nunit3-console.exe" -targetargs:"myproj.tests\bin\debug\myproj.tests.dll --result=NUnitResults.xml" opencover.xml contains <Module

OpenCover - cannot find PDB

两盒软妹~` 提交于 2019-12-23 19:23:31
问题 I am having some trouble getting OpenCover to work I have the following folder structure \Tools \Tools\Nunit \Tools\OpenCover \Buildartifacts When my code compiles, all the compiled code is generated into the BuildArtifacts folder. This includes the dll's and corresponding .pdb files I am struggling to get OpenCover to run From powershell I am entering the following command from the root folder: .\tools\OpenCover\OpenCover.Console.exe -register:user -target:.\tools\nunit\nunit-console.exe

Only coverage for test classes in opencover

爷,独闯天下 提交于 2019-12-23 09:49:38
问题 I have a problem to get the coverage from my classes with opencover. I have a Viewer.dll with the main classes and a Viewer_Test.dll with the tests for the viewer. After executing the commands all tests run as expected. OpenCover.Console.exe -register:user -target:"$(nunitpath)/nunit-console-x86.exe" -targetargs:"/noshadow Viewer_Tests.dll /domain:single" -filter:+[*]* -output:coverage.xml ReportGenerator.exe coverage.xml "coveragereport" html If I look in the generated report I find only the

How to generate code coverage report for asp.net unit tests in Azure DevOps build

吃可爱长大的小学妹 提交于 2019-12-21 05:21:23
问题 I need guidance in generating code coverage report of Asp.net unit tests in azure build pipeline. My project is based on .Net Framework 4.6. I am able to run all the unit tests using "visual studio test" task. I tried the "report generator" task, but it require cobertura or jacoco etc xml files, which am unable to generate in the build pipeline. Expectation - I want to get code coverage report for the runned unit tests which will show complete information like the lines coverage, branch