dotcover

dotCover and xUnit not gathering coverage statistics in some environments

那年仲夏 提交于 2020-01-01 18:50:42
问题 We're using dotCover 2.7 and xUnit.net 1.9.2. On my machine (Windows 7) and a co-worker's machine (Windows 8) we can run dotCover from the command line against one of our unit test assemblies that uses xUnit.net and get correct coverage reporting. On our build machine (Windows Server 2008 R2 Standard) when we run the same thing the only code coverage that dotCover reports is the unit test assembly itself. We're running xUnit.net using the MSBuild task. Here's the relevant pieces from the

What constitutes full code coverage when I invoke dotCover from an MSTest build step in TeamCity?

[亡魂溺海] 提交于 2019-12-24 05:52:52
问题 What is considered 100% when I invoke dotCover from an MSTest build step in TeamCity? Is 100% all of the compiled code? Is it all the code for all the assemblies which the tests have touched? Is it all the classes which the tests have touched? When I invoke dotCover from a TeamCity MSTest build step which runs My.Tests.dll, which lines are code are being tracked? 回答1: dotCover only provides reporting on statement-level coverage, where as other tools like NCover also include function and

Can't get correct assembly filters to work with TeamCity 8 and dotCover code coverage

笑着哭i 提交于 2019-12-23 10:08:27
问题 I have configured a Nunit test runner build step which successfully runs my testsuite, pointing at a test sub-project of my .Net solution eg. Solution/Solution.Test/bin/debug/Solution.Test.dll. My solution structure is as follows: Solution Solution.Lib Solution.Model Solution.Test Lib and Model dlls are referenced in the test project. I then turned on dotCover without any assembly filters and it performed code coverage analysis on the above test dll correctly. I then added a filter, -

DotCover shows only unit test source code not production code

社会主义新天地 提交于 2019-12-20 02:39:09
问题 I'm starting to use dotCover. I have a set of Debug compiled dlls + their pdbs. Then I've created a test project and executed resharper on it to see the coverage. What I'm getting is the coverage only of the unit test project instead of the whole coverage: I expected to find on the coverage tab the dlls referenced from my unit tests and their coverage. Am i right? Maybe I'm missing something or am I doing something wrong? 回答1: You can try to uncheck the "Match coverage results with current

How do I exclude types and methods from being covered by dotCover in TeamCity?

孤者浪人 提交于 2019-12-18 10:13:07
问题 I've got an existing C# 4 project which I've checked the test coverage for by using TestDriven.Net and the Visual Studio coverage feature, i.e. Test With -> Coverage from the context menu. The project contains some code I don't want covered, and I've solved that by adding the [ExcludeFromCodeCoverage] for those types and methods. We've just upgraded TeamCity to 6.0.3, and I've added dotCover coverage to the NUnit build step. I've managed to remove coverage for external assemblies such as

Error encountered when running dotcover console runner using xunit as the target executable

我与影子孤独终老i 提交于 2019-12-11 14:49:57
问题 I am using the DotCover console runner to check out the code coverage. Here is the command line I used - C:.\dotcover.exe cover /TargetExecutable="C:\packages\xunit.1.9.2\ lib\net20\xunit.runner.msbuild.dll" /TargetArguments="C:\bin\myConfigFolder\My.Tests.dll" /Output="c:\temp\CoverageReport.html" /ReportType="HTML" But I am getting the message below - JetBrains dotCover Console Runner v2.7.4.24. Copyright (c) 2009-2015 JetBrains s.r.o. All rights reserved. [JetBrains dotCover] Coverage

Unit tests are failing when run from dotCover

点点圈 提交于 2019-12-11 05:52:50
问题 I have a TFS 2015 build which builds one of our applications (it's an ASP.NET Web API application). As part of the build process it runs our unit tests. I have a Visual Studio Tes t build step which runs these unit tests and they all pass okay. I then run dotCover from this same build to determine code coverage (no we don't use the built-in code coverage as we don't have enterprise licences). However, when run from dotCover all the same unit tests fail. I use a script step to run a batch file

Attribute filter syntax for code coverage in TeamCity

好久不见. 提交于 2019-12-10 03:26:40
问题 Anyone knows the syntax for excluding code from coverage in Teamcity? I am using the ExcludeFromCodeCoverageAttribute on certain methods and want those excluded. It works well in Visual Studio but I don't understand how to get the same behavior in TeamCity. The Field I am trying to configure is located in MsTest -> .Net Coverage -> Attribute Filters: I have tried this: -:ExcludeFromCodeCoverageAttribute and this -:ExcludeFromCodeCoverage 回答1: After trying out a few variations this worked: -

DotCover in TeamCity 8 doesn't work

不羁的心 提交于 2019-12-09 14:32:49
问题 I try to run dotCover with my NUnit tests, in the TeamCity 8 as a build step. But no metter what I try I always get the same error in the log file: Step 4/4: Coverage (NUnit) (1s) [Step 4/4] Starting: C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe #TeamCityImplicit [Step 4/4] in directory: C:\TeamCity\buildAgent\work\6aee0f0d2626793d [Step 4/4] ##teamcity[importData type='dotNetCoverage' tool='dotcover' file='C:\TeamCity\buildAgent\temp\buildTmp

Visual Studio Test Explorer window will not open

 ̄綄美尐妖づ 提交于 2019-12-08 14:26:00
问题 For some reason I can't open the test explorer window in Visual Studio 2012. I click Test->Windows->Test Explorer and nothing happens... This problem may have been caused by recently uninstalling DotCover. I did this because my licence expired and I was having issues running tests without it (context menus weren't working). Any suggestions or advice much appreciated! Thanks. 回答1: In VS2012, Test Explorer has a bug in that the window doesn't get focus when you click Test > Windows > Test