Giter Site home page Giter Site logo

fortunen / finecodecoverage Goto Github PK

View Code? Open in Web Editor NEW
490.0 9.0 38.0 103.24 MB

Visualize unit test code coverage easily for free in Visual Studio Community Edition (and other editions too)

Home Page: https://marketplace.visualstudio.com/items?itemName=FortuneNgwenya.FineCodeCoverage

License: Other

C# 75.91% HTML 24.09%
free coverlet visual-studio community-edition csharp code-coverage unit-test vsix report-generator vb

finecodecoverage's Introduction

Fine Code Coverage

Highlights video

Build status

Download this extension from the Visual Studio Market Place ( vs 2019 ), Visual Studio Market Place ( vs 2022 ) or download from releases. Older versions can be obtained from here.


Prerequisites

For .Net - that the test adapters are nuget packages. For instance, the NUnit Test Adapter extension is not sufficient.


Introduction

Fine Code Coverage provides code coverage using one of 3 different coverage tools. In previous releases there were two coverage tools being utilised, OpenCover and Coverlet that will be referred to as 'old coverage'.
Microsoft now provides a free coverage solution that you can choose to use by setting the Visual Studio Fine Code Coverage enumeration option RunMsCodeCoverage. This will probably be the preferred coverage tool for most developers. It is currently in Beta.

With the old coverage it was possible for FCC to provide an abstraction over each tool's exclusion / inclusion options. This abstraction does not work for MS code coverage.
Thus you will find that there are separate configuration options for Ms coverage vs old coverage and options that are common to the two. Assembly level exclusions and inclusions can be achieved - see ExcludeAssemblies and IncludeAssemblies. Configuration is ( mostly ) determined from Visual Studio options, finecodecoverage-settings.xml files and project msbuild properties. All of these settings are optional. For options that have a project scope, these settings form a hierarchy where lower levels override or, for collections, override or merge with the level above. This is described in detail further on.

Regardless of the coverage tool employed the process begins with FCC reacting to the test explorer in visual studio. One of the 3 coverage tools provides the coverage results and the results can be opened from buttons on the Fine Code Coverage Tool Window. This coverage is not dynamic and represents the coverage obtained from the last time you executed tests. When the coverage becomes outdated, you can click the 'FCC Clear UI' button in Tools or run coverage again.

Details of how FCC is progressing with code coverage can be found in the Coverage Log tab in the Fine Code Coverage Tool Window with more detailed logs in the FCC Output Window Pane. If you experience issues then providing the logs from the output window will help to understand the nature of the problem.

Coverage Result Presentation

Report

Present a single unified report in the Fine Code Coverage Tool Window. The report shows line and branch coverage and risk hotspots with the facility to open your class files.

Editor

Coloured margins to indicate the coverage status of your code. Instrumented ( included and analysable) lines of code are either covered, uncovered or partially covered which means that not all branches were executed.

FCC provides the concept of dirty regions where previously instrumented code will no longer show instrumented status once you have change the code.

For C# and Visual Basic provides further coverage information :

FCC also allows you to see code that was not included in coverage and new lines that have been added since the last coverage run.

Both dirty and new line colouring needs to be turned on in options.

If desired, lines can be highlighted too by setting the available Visual Studio options. Read on for more details.

The colours can be controlled via Visual Studio / Tools / Options / Environment / Fonts and Colors / Text Editor / Display Items :

For Visual Studio Community, Professional and Enterprise you can use the settings

Coverage Touched Area FCC

Coverage Partially Touched Area FCC

Coverage Not Touched Area FCC

Coverage Dirty Area FCC

Coverage New Lines Area FCC

Coverage Not Included Area FCC

For versions that supply the items below FCC will use these by default over the equivalent FCC items so that colours defined in themes can be used. If you wish to be consistent for the 5 available items you can set UseEnterpriseFontsAndColors to false.

Coverage Not Touched Area

Coverage Partially Touched Area

Coverage Touched Area

You can turn off editor colouring by setting the visual studio option EditorCoverageColouringMode to Off. You can also set the option to DoNotUseRoslynWhenTextChanges if there is a performance issue. By doing so new lines colouring will not be as good. If you switch to one of the EditorCoverageColouringMode options then you will need to re-run coverage.

Why use MS Code Coverage ?

With the old coverage FCC needed to copy your test dll and dependencies and run OpenCover or Coverlet on those files. This is not necessary with ms code coverage. The old coverage would wait until tests have finished before starting the coverage tool to re-run all tests. This is not necessary with ms code coverage. The old coverage was based upon every test. Ms code coverage is coverage from the tests you select in the test explorer.

Supports C++ ! Note that FCC has not been properly tested with C++ projects but with a simple C++ class, tested with Google Test, FCC provides coverage.

How to utilize MS Code Coverage with FCC ?

Firstly you need to change the RunMsCodeCoverage option from No.

Ms code coverage requires a runsettings file that is configured appropriately for code coverage. This requires that you have the ms code coverage package and have pointed to it with the TestAdaptersPaths element as well as specifying the ms data collector. Exclusions and inclusions are also specified in the runsettings. I don't think that the documentation is clear enough on how this works so you may want to look at this issue.

FCC does not require you to do this. If you do not provide a runsettings and RunMsCodeCoverage is Yes then FCC will generate one and write the necessary entry in the project file.
Note that having a test project file open in visual studio whilst running tests may result in a conflict warning when FCC removes the entry at the end of the test. If RunMsCodeCoverage is IfInRunSettings then if the project has runsettings that includes the ms data collector element configured correctly then FCC will process the collected results.

Run settings generation from template

FCC includes the ms code coverage package and will create the necessary runsettings file for each test project being run from the test explorer window. The exclusions and inclusions will come from the combined settings, in a similar manner to the old coverage. As ms code coverage uses regex and has different methods of exclusion / inclusion to Coverlet and OpenCover there are ms specific Visual Studio options and associated elements.

As FCC provides a runsettings file for each test project ( if you have not provided a solution wide or project specific ) it has to write the RunSettingsFilePath element in the project file.
Although FCC clears the value of this element from the project file it is still present.

FCC creates the runsettings from a template using string replacement. If so desired you can provide your own templates. FCC will look for fcc-ms-runsettings-template.xml in the project directory or the solution directory. Your template needs to be a valid xml document but does not need to supply all of the run settings elements. FCC will add the replaceable ResultsDirectory and TestAdaptersPaths ( and the container RunConfiguration element if necessary) elements if not present. FCC will also add the ms DataCollector / Configuration / CodeCoverage replaceable elements if not present. It will also add the non exclusion / inclusion recommended CodeCoverage elements AllowLowIntegrityProcesses, CollectFromChildProcesses, CollectAspDotNet and UseVerifiableInstrumentation if not provided. UseVerifiableInstrumentation will be false for .Net Framework. To see the generated run settings use the RunSettingsFilePath element in the project file.

For a custom template, that provides its own elements that would otherwise have been provided by FCC, to participate in template replacement you need to add strings of the type %fcc_replace%.
Excludes and includes follow the format "%fcc_modulepaths_exclude%". For FCC to supply the fcc provided ms code coverage path to TestAdaptersPaths use %fcc_testadapter%.

Non template run settings interception

It is also possible to use your own runsettings file and have FCC add to it and replace. FCC will ensure that the TestAdaptersPaths element is present as well as the ms data collector. Unlike with a template, if the ms data collector is present then the xml only has replacement applied to it.

Run settings defaults and merging

Ms code coverage does provide a default Configuration / CodeCoverage element if not provided. It will also add some default exclusions if not present or merge them in unless you add the attribute mergeDefaults='false'. For instance it Attributes exclude ExcludeFromCodeCoverageAttribute. If you are interested see ...\AppData\Local\FineCodeCoverage\msCodeCoverage_version_\build\netstandard1.0\Microsoft.VisualStudio.TraceDataCollector.dll and the DynamicCoverageDataCollector.

Problems with ms code coverage

Please check troubleshooting before reporting an issue.

Old style coverage

Dlls are copied to a sub folder of project output folder which may affect your tests. The alternative is to set the option AdjacentBuildOutput to true. The coverage is provided by either OpenCover for old style projects and Coverlet for new style sdk projects. Although FCC provides an abstraction over both so that it is possible to ignore the differences between the two but there are circumstances where it is important to be aware of cover tool that will be run. This is most apparent when Coverlet is used, please read on for the specifics.
The other scenario would be when you want to use a specific version of the coverage tool. This can be configured.

The coverage tools that FCC leverages are by default installed into the FineCodeCoverage directory within Environment.SpecialFolder.LocalApplicationData. This can be changed with the ToolsDirectory Visual Studio option. Ensure that this containing directory exists and upon restart the tools will be installed within.


Highlights unit test code coverage

Run a(some) unit test(s) and ...

Get highlights on the code being tested and the code doing the testing

Highlights

Report Coverage View

Coverage View

Report Summary View

Summary View

Report Risk Hotspots View

Risk Hotspots View

Project configuration

The hierarchy is as follows :

a) Visual Studio options

Global Options

b) finecodecoverage-settings.xml files

These are found by walking up the directory structure from the project directory. By applying the attribute topLevel='true' to the root element the walk stops.

Given finecodecoverage-settings.xml in project directory and finecodecoverage-settings.xml in the solution directory the hierachy is :

Visual Studio options

Solution level finecodecoverage-settings.xml

Project level finecodecoverage-settings.xml

<FineCodeCoverage>
	<Enabled>
		True
	</Enabled>
	<!-- and more -->
</FineCodeCoverage>

c) msbuild project file

There are two ways of supplying these settings. Directly in the project file

<PropertyGroup Label="FineCodeCoverage">
  <Enabled>
	True
  </Enabled>
  <Exclude>
	[ThirdParty.*]*
	[FourthParty]*
  </Exclude>
  <Include>
	[*]*
  </Include>
  <ExcludeByFile>
	**/Migrations/*
	**/Hacks/*.cs
  </ExcludeByFile>
  <ExcludeByAttribute>
	MyCustomExcludeFromCodeCoverage
  </ExcludeByAttribute>
  <IncludeTestAssembly>
	True
  </IncludeTestAssembly>
  <ModulePathsExclude>
   .*Fabrikam.Math.UnitTest.dll
  </ModulePathsExclude>
  <!-- and more -->
</PropertyGroup>

With the FineCodeCoverage element.

<PropertyGroup>
  <FineCodeCoverage>
    <Enabled>
	  True
    </Enabled>
    <!-- and more -->
  </FineCodeCoverage>
</PropertyGroup>

This is necessary if storing project settings outside your project file and using msbuild Import.

It is also necessary if you want to have the setting element merge with that from the level above as msbuild does not support custom attributes.

Controlling merge

The default is to overwrite each collection property. This can be changed for all settings by setting defaultMerge='true' on the root element.

If you do supply the merge attribute on a setting element then it will be used.

Project only

Exclude Referenced Project in referenced project ( csproj/vbproj : OPTIONAL )

This is not transitive.

<PropertyGroup>
	<FCCExcludeFromCodeCoverage/>
</PropertyGroup>			

Coverlet specific

<PropertyGroup>
	<UseDataCollector/>
</PropertyGroup>

Coverlet has different "drivers". Fine Code Coverage has in the past only used the coverlet console driver. This has some issues associated with it. If you encounter 0% coverage or inconsistent coverage it is now possible to switch to the Data Collector driver. This is the better driver but cannot be used for all projects. For now this is opt in. In the future Fine Code Coverage will determine the appropriate driver. Please consult coverlet docs for version support.

Note that it is unnecessary to add the nuget coverlet.collector package as FCC internally supplies it.

Fine Code Coverage will use the Data Collector driver under two circumstances :

  1. You are testing with runsettings that contains the coverlet collector ( and not disabled)
  2. You set the UseDataCollector project property

The Coverlet Data Collector settings can be found here. If you are using option 2) above then Common settings ( Exclusions and inclusions ) will be generated from project propertes ( above ) and global visual studio options (see below ) with project properties taking precedence. If you are using option 1) then project and global options will only be used where a Common settings Configuration element is absent and the RunSettingsOnly option ( see below) has been changed to false.

Options

Option Description
Common
EditorCoverageColouringMode Set to Off, or Set to DoNotUseRoslynWhenTextChanges if there is a performance issue
ShowEditorCoverage Set to false to disable all editor coverage indicators
ShowCoverageInGlyphMargin Set to false to prevent coverage marks in the glyph margin
ShowCoveredInGlyphMargin Set to false to prevent covered marks in the glyph margin
ShowUncoveredInGlyphMargin Set to false to prevent uncovered marks in the glyph margin
ShowPartiallyCoveredInGlyphMargin Set to false to prevent partially covered marks in the glyph margin
ShowDirtyInGlyphMargin Set to true to show dirty marks in the glyph margin
ShowNewInGlyphMargin Set to true to show new line marks in the glyph margin
ShowCoverageInOverviewMargin Set to false to prevent coverage marks in the overview margin
ShowCoveredInOverviewMargin Set to false to prevent covered marks in the overview margin
ShowUncoveredInOverviewMargin Set to false to prevent uncovered marks in the overview margin
ShowPartiallyCoveredInOverviewMargin Set to false to prevent partially covered marks in the overview margin
ShowDirtyInOverviewMargin Set to true to show dirty marks in the overview margin
ShowNewInOverviewMargin Set to true to show new line marks in the overview margin
ShowLineCoverageHighlighting Set to true to allow coverage line highlighting
ShowLineCoveredHighlighting Set to false to prevent covered line highlighting
ShowLineUncoveredHighlighting Set to false to prevent uncovered line highlighting
ShowLinePartiallyCoveredHighlighting Set to false to prevent partially covered line highlighting
ShowLineDirtyHighlighting Set to true to show dirty line highlighting
ShowLineNewHighlighting Set to true to show new line highlighting
UseEnterpriseFontsAndColors Set to false to use FCC Fonts And Colors items
ShowToolWindowToolbar Set to false to hide the toolbar on the tool window. Requires restarting Visual Studio. The toolbar has buttons for viewing the Cobertura xml and the risk hotspots.
FCC Solution Output Directory Name To have fcc output visible in a sub folder of your solution provide this name
ToolsDirectory Folder to which copy tools subfolder. Must alredy exist. Requires restart of VS.
ThresholdForCyclomaticComplexity When cyclomatic complexity exceeds this value for a method then the method will be present in the risk hotspots tab.
StickyCoverageTable Set to true for coverage table to have a sticky thead.
NamespacedClasses Set to false to show types in report in short form. Affects grouping.
NamespaceQualification Control qualification of types in report when NamespacedClasses is true.
FullyQualified - always fully qualify.
AlwaysUnqualified - always unqualified.
UnqualifiedByNamespace - unqualified when grouping by namespace.
QualifiedByNamespaceLevel - omits the first grouping level identifier parts. Reduces space whilst maintaining uniqueness.
HideFullyCovered Set to true to hide classes, namespaces and assemblies that are fully covered.
Hide0Coverage Set to true to hide classes, namespaces and assemblies that have 0% coverage.
Hide0Coverable Set to false to show classes, namespaces and assemblies that are not coverable.
Enabled Specifies whether or not coverage output is enabled
DisabledNoCoverage Set to false for VS Option Enabled=false to not disable coverage
RunWhenTestsFail By default coverage runs when tests fail. Set to false to prevent this. Cannot be used in conjunction with RunInParallel
RunWhenTestsExceed Specify a value to only run coverage based upon the number of executing tests. Cannot be used in conjunction with RunInParallel
RunMsCodeCoverage Change to IfInRunSettings to only collect with configured runsettings. Yes for runsettings generation.
IncludeTestAssembly Specifies whether to report code coverage of the test assembly
IncludeReferencedProjects Set to true to add all directly referenced projects to Include.
IncludeAssemblies Provide a list of assemblies to include in coverage. The dll name without extension is used for matching.
ExcludeAssemblies Provide a list of assemblies to exclude from coverage. The dll name without extension is used for matching.

OpenCover / Coverlet
AdjacentBuildOutput If your tests are dependent upon their path set this to true.
Exclude Filter expressions to exclude specific modules and types (multiple values)
Include Filter expressions to include specific modules and types (multiple values)
ExcludeByFile OpenCover uses * wildcard matching. Coverlet uses file system globbing
ExcludeByAttribute Exclude attributed code at assembly, type and method level. Add fully qualified or unqualified attribute types.
RunInParallel By default OpenCover / Coverlet tests run and then coverage is performed. Set to true to run coverage immediately

Ms code coverage Each of below is an array of regexes to be transformed into runsettings elements see
ModulePathsExclude Exclude - Matches assemblies specified by assembly name or file path.
ModulePathsInclude Include - Matches assemblies specified by assembly name or file path.
CompanyNamesExclude Exclude - Matches assemblies by the Company attribute.
CompanyNamesInclude Include - Matches assemblies by the Company attribute.
PublicKeyTokens Exclude Exclude - Matches signed assemblies by the public key token.
PublicKeyTokens Include Include - Matches signed assemblies by the public key token.
SourcesExclude Exclude - Matches elements by the path name of the source file in which they're defined.
SourcesInclude Include - Matches elements by the path name of the source file in which they're defined.
AttributesExclude Exclude - Matches elements that have the specified attribute. Specify the full name of the attribute
AttributesInclude Include - Matches elements that have the specified attribute. Specify the full name of the attribute
FunctionsExclude Exclude - Matches procedures, functions, or methods by fully qualified name, including the parameter list.
FunctionsInclude Include - Matches procedures, functions, or methods by fully qualified name, including the parameter list.

Coverlet
RunSettingsOnly Specify false for global and project options to be used for coverlet data collector configuration elements when not specified in runsettings
CoverletCollectorDirectoryPath Specify path to directory containing coverlet collector files if you need functionality that the FCC version does not provide.
CoverletConsoleLocal Specify true to use your own dotnet tools local install of coverlet console.
CoverletConsoleCustomPath Specify path to coverlet console exe if you need functionality that the FCC version does not provide.
CoverletConsoleGlobal Specify true to use your own dotnet tools global install of coverlet console.
The "CoverletConsole" settings have precedence Local / CustomPath / Global.

OpenCover
OpenCoverRegister Change from Default if FCC determination of path32 or path64 is incorrect.
OpenCoverTarget Supply your own target if required.
OpenCoverTargetArgs If supplying your own target you can also supply additional arguments. FCC supplies the test dll path.
OpenCoverCustomPath Specify path to open cover exe if you need functionality that the FCC version does not provide.
ThresholdForNPathComplexity When npath complexity exceeds this value for a method then the method will be present in the risk hotspots tab.
ThresholdForCrapScore When crap score exceeds this value for a method then the method will be present in the risk hotspots tab.

Exclusions and inclusions

You probably want to set IncludeReferencedProjects to true. This will ensure that you do not get coverage for testing frameworks - only your code.

Coverlet and OpenCover use filter expressions. Filter expressions

Wildcards

* => matches zero or more characters

Examples

[*]* => All types in all assemblies.

[coverlet.*]Coverlet.Core.Coverage => The Coverage class in the Coverlet.Core namespace belonging to any assembly that matches coverlet.* (e.g coverlet.core)

[*]Coverlet.Core.Instrumentation.* => All types belonging to Coverlet.Core.Instrumentation namespace in any assembly

[coverlet.*.tests]* => All types in any assembly starting with coverlet. and ending with .tests

Both 'Exclude' and 'Include' options can be used together but 'Exclude' takes precedence.

Ms code coverage uses regexes. You can include or exclude assemblies or specific types and members from code coverage analysis. If the Include section is empty or omitted, then all assemblies that are loaded and have associated PDB files are included. If an assembly or member matches a clause in the Exclude section, then it is excluded from code coverage. The Exclude section takes precedence over the Include section: if an assembly is listed in both Include and Exclude, it will not be included in code coverage.

You can ignore a method or an entire class from code coverage by applying the [ExcludeFromCodeCoverage] attribute present in the System.Diagnostics.CodeAnalysis namespace.

For .Net ( not .Net Framework ) this attribute can be applied at the assembly level.

For .Net Framework see FCCExcludeFromCodeCoverage, above, for similar functionality.

To ignore code attributed with a different type:

You can also ignore additional attributes by adding to the 'ExcludeByAttribute' list For Coverlet/OpenCover add to adding to the 'ExcludeByAttribute' list ( fully qualified or unqualified). For ms code coverage add to the 'AttributesExclude' list. This uses regex matching.

FCC Output

FCC outputs, by default, inside each test project's Debug folder. If you prefer you can specify a folder to contain the files output internally and used by FCC. Both of the methods below look for a directory containing a .sln file in an ascendant directory of the directory containing the first test project file. If such a solution directory is found then the logic applies.

If the solution directory has a sub directory fcc-output then it will automatically be used.

Alternatively, if you supply FCCSolutionOutputDirectoryName in options the directory will be created if necessary and used.

Contribute

Check out the contribution guidelines if you want to contribute to this project.

For cloning and building this project yourself, make sure to install the Extensibility Essentials extension for Visual Studio which enables some features used by this project.

License

Apache 2.0

Credits

Coverlet

OpenCover

ReportGenerator

Please support the project

Provider Type Link
Paypal Once
Liberapay Recurring Donate using Liberapay

finecodecoverage's People

Contributors

brendonparker avatar fortunen avatar matthiasschnelteabb avatar t-johnson avatar tonyhallett avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

finecodecoverage's Issues

Exception: The calling thread cannot access this object because a different thread owns it.

Installed product versions

  • Visual Studio: 2019 Professional version 16.7.7
  • This extension: 1.0.104

Description

Running all unit tests causes fine code coverage to throw an exception which is logged in the Output (build) window.

Steps to recreate

(using the 'Debug | Any CPU' configuration)
Select test window.
Choose run all tests.

Current behavior

The exception thrown is: Fine Code Coverage : Error processing unit test events
System.InvalidOperationException: The calling thread cannot access this object because a different thread owns it.
at System.Windows.Threading.Dispatcher.VerifyAccess()
at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
at FineCodeCoverage.Output.OutputToolWindowControl.Clear() in C:\projects\finecodecoverage\FineCodeCoverage\Output\OutputToolWindowControl.xaml.cs:line 54
at FineCodeCoverage.Impl.TestContainerDiscoverer.OperationState_StateChanged(Object sender, OperationStateChangedEventArgs e) in C:\projects\finecodecoverage\FineCodeCoverage\Impl\TestContainerDiscoverer.cs:line 136

Expected behavior

Code coverage to be collected/displayed.

Single Page Application (SPA) Mvc project has not be calculated by fine code coverage.

Installed product versions

  • Visual Studio: [Microsoft Visual Studio Professional 2019
    Version 16.8.3]
  • This extension: [1.1.25]

Description

I have two diffrent project, one of them VS. ASPX and others is Single Page Application (SPA) Mvc.
I have no problem with ASPX

but other project has not be calculated by fine converaged I attached screen shoot like below.
Ekran gรถrรผntรผsรผ 2020-12-10 155053

Steps to recreate

  1. Replace this
  2. text with
  3. the steps
  4. to recreate

Current behavior

Explain what it's doing and why it's wrong

Expected behavior

Explain what it should be doing after it's fixed.

Side Notes

Nothing happens after test run with xUnit

Installed product versions

  • Visual Studio: 2019 Professional
  • xUnit: 2.4.1
  • Xamarin Forms: 4.8

Description

After running a test successfully no line with
_Fine Code Coverage =============START==========
appears in the output window and also the Fine Code Coverage windows stays empty.
Did i not installed and/or initialized somthing? Or does the extension not work with Xamarin and/or xUnit?

Unable to update from 1.0.90 to 1.0.104 in VS2019CE

Installed product versions

  • Visual Studio: 2019 Community (v16.7.7)
  • Additional VS installation: Visual Studio: 2017Enterprise (v15.9.28) -> Fine Code Coverage is not installed here
  • This extension: 1.0.90

Description

The VSIX package cannot be updated in Visual Studio 2019 (community edition) from 1.0.90 to 1.0.104, even if completely uninstalled and reinstalled. It looks, like a re-installation fetches again 1.0.90.
When trying to update, a error message occurs "This extension is already installed to all applicable products". After a restart of VS, the extension manager shows again, that Fine Code Coverage is ready to be updated from 1.0.90 to 1.0.104

I'am sorry to provide not more information about that. Is there any possibility to enable logging, or can you tell where I find useful information about the failed installation?

Steps to recreate

  1. Start VS2019 with an arbitrary project
  2. Select menu item "Extensions" -> "Manage Extensions"
  3. Go to the tab "Updates"
    3b. Fine Code Coverage should be available to be updated here
  4. Click on "Update"
  5. Close VS
    5b. The VSIX istaller starts and shows the error
    2020-11-03 01_49_17-VSIX Installer
  6. Restart VS
  7. The Extension is again showed to be updated
    2020-11-03 01_50_07-PicoXLSX3 - Microsoft Visual Studio

Current behavior

The installer seems to have trouble with the configuration of the available VS installations and refuses to update

Expected behavior

The extension should be updated after triggering the update and closing VS

Excluding file by reading ExcludeFromCodeCoverageAttribute from project file does not add any value.

The commit that you made does not add any value.

foreach (var referenceProjectWithExcludeAttribute in project.ReferencedProjects.Where(x => x.HasExcludeFromCodeCoverageAssemblyAttribute))

`

			foreach (var referenceProjectWithExcludeAttribute in project.ReferencedProjects.Where(x => x.HasExcludeFromCodeCoverageAssemblyAttribute))
			{
				filters.Add($@"-[{referenceProjectWithExcludeAttribute.AssemblyName}]*");
			}

`

foreach (var referenceProjectWithExcludeAttribute in project.ReferencedProjects.Where(x => x.HasExcludeFromCodeCoverageAssemblyAttribute))

`

		foreach (var referenceProjectWithExcludeAttribute in project.ReferencedProjects.Where(x => x.HasExcludeFromCodeCoverageAssemblyAttribute))
		{
			coverletSettings.Add($@"--exclude ""[{referenceProjectWithExcludeAttribute.AssemblyName}]*""");
		}

`

private static bool HasExcludeFromCodeCoverageAssemblyAttribute(XElement projectFileXElement)

`

	private static bool HasExcludeFromCodeCoverageAssemblyAttribute(XElement projectFileXElement)
	{
		/*
		 ...
		<ItemGroup>
			<AssemblyAttribute Include="System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute" />
		</ItemGroup>
		...
		 */

		var xassemblyAttribute = projectFileXElement.XPathSelectElement($"/ItemGroup/AssemblyAttribute[@Include='System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute']");
		
		return xassemblyAttribute != null;
	}

`

The problem lies with the exclude attribute that you are searching for.
Coverlet already has built in support for any attribute with name ExcludeFromCodeCoverage so there is no need to add to excludes.

https://github.com/tonyhallett/coverlet/blob/bc1626c20576bc2a1ac58aecc942dadf0be52d49/src/coverlet.core/Instrumentation/Instrumenter.cs#L233
_excludedAttributes = PrepareAttributes(excludedAttributes, nameof(ExcludeFromCoverageAttribute), nameof(ExcludeFromCodeCoverageAttribute)); /// private bool IsExcludeAttribute(CustomAttribute customAttribute) { return Array.IndexOf(_excludedAttributes, customAttribute.AttributeType.Name) != -1; }

OpenCover only runs for .Net projects and as such it is not possible to add System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute as an assembly level attribute ( you can for .Net Core ).

If you change your xpath to match only on name and not on fully qualified then this would be beneficial to OpenCover runs.
Be sure to check for ExcludeFromCodeCoverage and ExcludeFromCodeCoverageAttribute and if you want to align with Coverlet then ExcludeFromCoverage and ExcludeFromCoverageAttribute too.

Originally posted by @tonyhallett in #39 (comment)

Find Code Coverage window always opens when trying to view Test Explorer

Installed product versions

  • Visual Studio: 2019 Professional
  • This extension: 16.7.6

Description

After opening the Fine Code Coverage window from the View menu, each time the Test Explorer is opened, the FFC window opens automatically. This may only happen once per session of VS - or once per opened solution.

I had the window docked to the bottom pane and had autohide set. When I noticed the window popping open when opening the Test Explorer, which I have docked to the right side with autohide set, I clicked the X to close the FFC window. It did not reopen after that until VS was closed and reopened. Usually the window state and location is saved when closing VS.

Steps to recreate

  1. From the View -> Other Windows menu, select Fine Code Coverage
  2. Dock the window to the bottom panel
  3. Click the pin to set the autohide of the window
  4. Close and reopen Visual Studio
  5. Open a solution with test projects
  6. Open Test Explorer -----> the FFC window pops open which forces the Test Explorer window to hide.

Current behavior

As a user, I want to open the Text Explorer window without it auto hiding due to the FFC window taking control.

Expected behavior

The FFC window does not automatically open with the Text Explorer window is opened.

Code coverage is not always updated

Installed product versions

  • Visual Studio: 2019 Community 16.7.2
  • This extension: 1.0.39

Description

Some times the code coverage isn't updated after a test run. When I go to the output log it indicates that an error occurred (see below). I am actually not quite sure why this happens, but it seems that it always happens when I run tests the first time after changing my code. Running tests the second time and it seems to work.

Steps to recreate

  1. Clone the https://github.com/dozer75/BranchCoverageDemo repo
  2. Open it in Visual Studio and run tests
    • Sometimes the error occurs already here
  3. Change something in Config.cs (e.g. remove the ? after options)
  4. Run tests from test explorer

Current behavior

Coverage is not updated and the Fine Code Coverage output shows:

2020-09-05 13:50:09 : Updating coverage ...

2020-09-05 13:50:10 : Error during Coverlet -> Run

2020-09-05 13:50:10 : Coverage updated!

Expected behavior

There should not be any errors and the coverage should be updated.

It would have been nice if the output showed the actual error to, it would have make it easier to find the issue.

Support branch coverage

Installed product versions

  • Visual Studio: 2019 Community 16.7.2
  • This extension: 1.0.39

Description

Please use branch coverage instead of line coverage to indicate the code coverage.

While line coverage is a start, it's also important to show if a line is only partial covered (branch coverage). This is especially important in multi-conditional statements where it may be difficult to see if all parts of a statement is covered.

For example, using https://github.com/danielpalme/ReportGenerator it shows like this:
image

I don't expect the green/red combination indicator, but at least the tag should be yellow (see expected behaviour).

I like the intention of this tool having it integrated like this in Visual Studio, but this is a quite big limitation to actual code coverage due to this.

Steps to recreate

  1. Clone the https://github.com/dozer75/BranchCoverageDemo repo.
  2. Open it in Visual Studio and run tests

Current behavior

After recreating the issue, verify that Config.cs:12 is marked green

Expected behavior

The Config.cs:12 should have been marked yellow to indicate that it is partially covered (It would have been nice to know exactly how many of the branches that was covered (tool tip on the color?). Se screen dump from the report generator for example from that code coverage generator.

Code coverage fails if deterministic build is enabled for project

Installed product versions

  • Visual Studio: 2019 Community 16.7.2
  • This extension: 1.0.39

Description

The code coverage does not work when deterministic build are configured for the projects that is being tested.

This issue is caused by the problem I mentioned here and a suggestion to how to fix this when I run Coverlet in my code was suggested and worked. However it seems that this extension doesn't handle it.

Steps to recreate

  1. Have a project that has deterministic build enabled
  2. Run tests on that project

Current behavior

No coverage is displayed and the Finde code coverage log shows message similar to the problem mentioned in description.

Expected behavior

The code coverage routine should work with deterministic builds. Refer to the link above.

Value cannot be null

Installed product versions

  • Visual Studio: 2019 Professional
  • This extension: 1.0.90
    I'm using MSTest

Description

When I run tests on Output Window show me these message:

Fine Code Coverage : ================================== START ==================================

Fine Code Coverage : Error
System.AggregateException: One or more errors occurred. ---> System.ArgumentNullException: Value cannot be null.
Parameter name: path
   at System.IO.Directory.GetFiles(String path)
   at FineCodeCoverage.Engine.FCCEngine.<>c.<ReloadCoverage>b__23_1(String testDllFile) in C:\projects\finecodecoverage\FineCodeCoverage\Core\FCCEngine.cs:line 414
   at System.Linq.Parallel.SelectQueryOperator`2.SelectQueryOperatorResults.GetElement(Int32 index)
   at System.Linq.Parallel.SelectQueryOperator`2.SelectQueryOperatorResults.GetElement(Int32 index)
   at System.Linq.Parallel.SelectQueryOperator`2.SelectQueryOperatorResults.GetElement(Int32 index)
   at System.Linq.Parallel.SelectQueryOperator`2.SelectQueryOperatorResults.GetElement(Int32 index)
   at System.Linq.Parallel.QueryResults`1.get_Item(Int32 index)
   at System.Linq.Parallel.PartitionedDataSource`1.ListContiguousIndexRangeEnumerator.MoveNext(T& currentElement, Int32& currentKey)
   at System.Linq.Parallel.WhereQueryOperator`1.WhereQueryOperatorEnumerator`1.MoveNext(TInputOutput& currentElement, TKey& currentKey)
   at System.Linq.Parallel.StopAndGoSpoolingTask`2.SpoolingWork()
   at System.Linq.Parallel.SpoolingTaskBase.Work()
   at System.Linq.Parallel.QueryTask.BaseWork(Object unused)
   at System.Linq.Parallel.QueryTask.<>c.<.cctor>b__10_0(Object o)
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
   --- End of inner exception stack trace ---
   at System.Linq.Parallel.QueryTaskGroupState.QueryEnd(Boolean userInitiatedDispose)
   at System.Linq.Parallel.SpoolingTask.SpoolStopAndGo[TInputOutput,TIgnoreKey](QueryTaskGroupState groupState, PartitionedStream`2 partitions, SynchronousChannel`1[] channels, TaskScheduler taskScheduler)
   at System.Linq.Parallel.DefaultMergeHelper`2.System.Linq.Parallel.IMergeHelper<TInputOutput>.Execute()
   at System.Linq.Parallel.MergeExecutor`1.Execute()
   at System.Linq.Parallel.MergeExecutor`1.Execute[TKey](PartitionedStream`2 partitions, Boolean ignoreOutput, ParallelMergeOptions options, TaskScheduler taskScheduler, Boolean isOrdered, CancellationState cancellationState, Int32 queryId)
   at System.Linq.Parallel.PartitionedStreamMerger`1.Receive[TKey](PartitionedStream`2 partitionedStream)
   at System.Linq.Parallel.WhereQueryOperator`1.WrapPartitionedStream[TKey](PartitionedStream`2 inputStream, IPartitionedStreamRecipient`1 recipient, Boolean preferStriping, QuerySettings settings)
   at System.Linq.Parallel.UnaryQueryOperator`2.UnaryQueryOperatorResults.ChildResultsRecipient.Receive[TKey](PartitionedStream`2 inputStream)
   at System.Linq.Parallel.UnaryQueryOperator`2.UnaryQueryOperatorResults.GivePartitionedStream(IPartitionedStreamRecipient`1 recipient)
   at System.Linq.Parallel.UnaryQueryOperator`2.UnaryQueryOperatorResults.GivePartitionedStream(IPartitionedStreamRecipient`1 recipient)
   at System.Linq.Parallel.QueryOperator`1.ExecuteAndGetResultsAsArray()
   at System.Linq.ParallelEnumerable.ToArray[TSource](ParallelQuery`1 source)
   at FineCodeCoverage.Engine.FCCEngine.<>c__DisplayClass23_0.<ReloadCoverage>b__0(Object state) in C:\projects\finecodecoverage\FineCodeCoverage\Core\FCCEngine.cs:line 304
---> (Inner Exception #0) System.ArgumentNullException: Value cannot be null.
Parameter name: path
   at System.IO.Directory.GetFiles(String path)
   at FineCodeCoverage.Engine.FCCEngine.<>c.<ReloadCoverage>b__23_1(String testDllFile) in C:\projects\finecodecoverage\FineCodeCoverage\Core\FCCEngine.cs:line 414
   at System.Linq.Parallel.SelectQueryOperator`2.SelectQueryOperatorResults.GetElement(Int32 index)
   at System.Linq.Parallel.SelectQueryOperator`2.SelectQueryOperatorResults.GetElement(Int32 index)
   at System.Linq.Parallel.SelectQueryOperator`2.SelectQueryOperatorResults.GetElement(Int32 index)
   at System.Linq.Parallel.SelectQueryOperator`2.SelectQueryOperatorResults.GetElement(Int32 index)
   at System.Linq.Parallel.QueryResults`1.get_Item(Int32 index)
   at System.Linq.Parallel.PartitionedDataSource`1.ListContiguousIndexRangeEnumerator.MoveNext(T& currentElement, Int32& currentKey)
   at System.Linq.Parallel.WhereQueryOperator`1.WhereQueryOperatorEnumerator`1.MoveNext(TInputOutput& currentElement, TKey& currentKey)
   at System.Linq.Parallel.StopAndGoSpoolingTask`2.SpoolingWork()
   at System.Linq.Parallel.SpoolingTaskBase.Work()
   at System.Linq.Parallel.QueryTask.BaseWork(Object unused)
   at System.Linq.Parallel.QueryTask.<>c.<.cctor>b__10_0(Object o)
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()<---

how can I see which metod has been covered buy unit test or uncovered in .cs file ?

Installed product versions

  • Visual Studio: [2019 Professional]

Description

how can I see which metod has been covered buy unit test or uncovered in .cs file ?

Steps to recreate

  1. Replace this
  2. text with
  3. the steps
  4. to recreate

Current behavior

Explain what it's doing and why it's wrong

Expected behavior

Explain what it should be doing after it's fixed.

Side Notes

Code Coverage View Window Drawing Issues

Installed product versions

  • Visual Studio: 2019 Community
  • This extension: 1.0.74

Description

The new extension 'View Window' has some redraw issues where column headings or text overwrites neighboring columns.

Steps to recreate

  1. Run tests
  2. View "Fine Code Coverage" from Views->Other Windows

Current behavior

The text overwrites other text in adjacent columns

Coverage Columns

Coverage Columns 2

Expected behavior

Text should not overwrite

FineCodeCoverage: exception when generating report

Installed product versions

  • Visual Studio: 2019 Professional
  • This extension: 1.1.10

Description

Replace this text with a short description

Steps to recreate

  1. Install extension
  2. Run on a .NET Core 3.1 project
  3. Observe that it does not work.

Current behavior

FineCodeCoverage does not work, and throws an exception.

Fine Code Coverage : ================================== START ==================================

Fine Code Coverage : Ensure Work Folder Exists (Redacted.Converter.IntegrationTests)

Fine Code Coverage : Synchronize Output Files To Work Folder (Redacted.Converter.IntegrationTests)

Fine Code Coverage : Run Coverage Tool (Redacted.Converter.IntegrationTests)

Fine Code Coverage : Coverlet Run (Redacted.Converter.IntegrationTests) Arguments 
"Z:\Projects\Redacted.Converter.IntegrationTests\bin\Debug\fine-code-coverage\Redacted.Converter.IntegrationTests.dll"
--format "cobertura"
--exclude-by-file "**/Migrations/*"
--exclude-by-attribute "GeneratedCode"
--include-test-assembly
--target "dotnet"
--threshold-type line
--threshold-stat total
--threshold 0
--output "Z:\Projects\Redacted.Converter.IntegrationTests\bin\Debug\fine-code-coverage\_outputfolder\_cover.tool.xml"
--targetargs "test  ""Z:\Projects\Redacted.Converter.IntegrationTests\bin\Debug\fine-code-coverage\Redacted.Converter.IntegrationTests.dll"" --nologo --blame --results-directory ""Z:\Projects\Redacted.Converter.IntegrationTests\bin\Debug\fine-code-coverage\_outputfolder"" --diag ""Z:\Projects\Redacted.Converter.IntegrationTests\bin\Debug\fine-code-coverage\_outputfolder/diagnostics.log""  "

Fine Code Coverage : Coverlet Run (Redacted.Converter.IntegrationTests)

Fine Code Coverage : ReportGenerator Run Arguments [reporttype:Cobertura] 
"-targetdir:Z:\Projects\Redacted.Converter.IntegrationTests\bin\Debug\fine-code-coverage\_outputfolder"
"-reports:Z:\Projects\Redacted.Converter.IntegrationTests\bin\Debug\fine-code-coverage\_outputfolder\_cover.tool.xml"
"-reporttypes:Cobertura"

Fine Code Coverage : Error
System.Exception
   at FineCodeCoverage.Engine.ReportGenerator.ReportGeneratorUtil.<RunReportGenerator>g__run|22_1(String outputReportType, String inputReports, <>c__DisplayClass22_0& ) in C:\projects\finecodecoverage\FineCodeCoverage\Core\ReportGenerator\ReportGeneratorUtil.cs:line 217
   at FineCodeCoverage.Engine.ReportGenerator.ReportGeneratorUtil.RunReportGenerator(IEnumerable`1 coverOutputFiles, Boolean darkMode, String& unifiedHtmlFile, String& unifiedXmlFile, Boolean throwError) in C:\projects\finecodecoverage\FineCodeCoverage\Core\ReportGenerator\ReportGeneratorUtil.cs:line 228
   at FineCodeCoverage.Engine.FCCEngine.ReloadCoverage(IEnumerable`1 projects, Boolean darkMode) in C:\projects\finecodecoverage\FineCodeCoverage\Core\FCCEngine.cs:line 453
   at FineCodeCoverage.Impl.TestContainerDiscoverer.<>c__DisplayClass21_0.<OperationState_StateChanged>b__0() in C:\projects\finecodecoverage\FineCodeCoverage\Impl\TestContainerDiscoverer.cs:line 156

Fine Code Coverage : ================================== ERROR ==================================

Expected behavior

FineCodeCoverage works.

Side Notes

I tried to create a demonstration project from a project where FineCodeCoverage did not work, but after removing some source code and projects, it suddenly works. Unfortunately, I cannot share the original project, but I did start investigating.

Two things I observe:

  • The output folder is empty ('bin\Debug\fine-code-coverage_outputfolder')
  • I don't see a Coverlet results table in the debug log.

I tried to run Coverlet.Console directly with the exact same arguments, and I see that it crashes:

The library 'hostpolicy.dll' required to execute the application was not found in ...

I'll investigate further, but it seems that FineCodeCoverage doesn't detect that target is crashing.

Memory leak

Installed product versions

  • Visual Studio: 2019
  • This extension: 1.1.4

Description

After each run of tests VS process consumes more RAM (during the extension processing the result) after many runs the process exceeds the limit then crash.

It would be great to look at what's making the memory leak & and would be better to be out-of-proc extension for future proof.

Many many thanks for the great extension I really like it.

Can't get it work

I have big problems to get Fine Code Coverage to work.
I'm using the latest Visual Studio 2019 Community edition release, installed the Fine Code Coverage extension from Marketplace and installed OpenCover (latest version).
Now I start my unit test in Test explorer as explained in readme.md but ... nothing happens after unit test is finished. I have a "Fine Code Coverage" that is completely empty and there are no color markers as shown in the screenshots.

What am I missing?

Best Regards
Michael Hartmann

Coverage view doesn't navigate to the generic classes

Installed product versions

  • Visual Studio: 2019 Community Edition 16.8.1
  • This extension: fcc-f339fe606-9d51-4fca-895c-d50375137b62

Description

When I click the class name in the Coverage view, it works fine for the regular classes, but for the generic ones it doesn't.

Steps to recreate

  1. Checkout the project https://github.com/evilguest/atropos
  2. Open it in VS
  3. Run the tests via the Test Explorer
  4. Open the Fine Code Coverage view
  5. Open the Coverage tab
  6. Try clicking on various class names

Current behavior

For any generic classes it fires up the dialog with error message: Not Found: Atropos_ImmutableDictionary_2 (where the Atropos_ImmutableDictionary_2 refers to the class Atropos.ImmutableDictionary<K, V>)

Expected behavior

It is expected to open the source file for the class in the Visual Studio Editor

Is there an Overview of uncovered Code?

Probably not really an "issue" but a feature request.
But is there a way to visualize the uncovered Code in some Tree view that shows your solution, Classes, methods that are not covered?

I have a by now bigger project with some tests. Your (fine) tool showed me that a some stuff is uncovered (what i have to cover now)
and it would be nice to have a overview instead of just highlighted code lines per open file.

Also it would be useful to "ignore" or "it IS covered" some of these methods.
For example i have a database with a lot of tables with a lot of properties (146 tables atm) and all of the Property getters are highlighted because most of them never will be explicitly used.

I checked out your code but i have absolutely no knowledge of vs extension and just dumped all the lines in the log to see an overview but a real ui with some clickable nodes that lead to the corresponding method in your files would be reaaaaaally nice!

Coverlet timed out (.net core 3.1 project)

Installed product versions

  • Visual Studio: 2019 community 16.7.6
  • This extension: 1.0.89
  • Windows 10 x64

Description

Coverlet.console seems to hang when started by extension, but works fine when I run it manually with same parameters (both global executable and local in AppData/Local/FineCodeCoverage/coverlet/). It creates _outputfolder/diagnostics.log, but no _cover.tool.xml.

Probably it's an issue in coverlet itself, but still.

Steps to recreate

  1. run test project (netcoreapp3.1) with some passing and some failing tests

I've managed to reproduce same behavior running coverlet from simple .netcore console app with parameters like this:

var processStartInfo = new ProcessStartInfo
    {
        CreateNoWindow = true,
        UseShellExecute = false,
        RedirectStandardError = true,
        RedirectStandardOutput = true,
        ...
    };

but it works fine, when running in separate window with no stream redirection:

var processStartInfo = new ProcessStartInfo
    {
        CreateNoWindow = false,
        UseShellExecute = false,
        RedirectStandardError = false,
        RedirectStandardOutput = false,
        ...
    };

When I made these changes in extension itself, it started working, but with visible console window for coverlet obviously :)

about [ExcludeFromCodeCoverage]

despite the class has attribute [ExcludeFromCodeCoverage]

the fine code coverage calculated that class as uncoverage. I tried to add screen shot below I 'm not sure.

image
fineCodeCoverage

I can not run fine code coverage today

I can not run fine code coverage today, there is no any error too.

Installed product versions

  • Visual Studio: [example 2019 Professional]
  • This extension: [example 1.1.21]

OutPut detail;
1>------ Build started: Project: BusinessServices, Configuration: Debug Any CPU ------
1> BusinessServices -> G:\GitProjects\Arles\ARLESApplication\ARLESServer\Service\BusinessServices\bin\Debug\BusinessServices.dll
2>------ Build started: Project: UnitTest, Configuration: Debug Any CPU ------
3>------ Build started: Project: IntegrationWebService, Configuration: Debug Any CPU ------
3> IntegrationWebService -> G:\GitProjects\Arles\ARLESApplication\ARLESServer\Integration\IntegrationWebService\bin\IntegrationWebService.dll
2> UnitTest -> G:\GitProjects\Arles\ARLESApplication\ARLESServer\ArlesUnitTests\UnitTest\bin\Debug\UnitTest.dll
4>------ Build started: Project: FaturaServiceTests, Configuration: Debug Any CPU ------
5>------ Build started: Project: EntegrasyonServiceTests, Configuration: Debug Any CPU ------
6>------ Build started: Project: CachingTests, Configuration: Debug Any CPU ------
7>------ Build started: Project: BusinessServicesTests, Configuration: Debug Any CPU ------
8>------ Build started: Project: AnaVeriServiceTests, Configuration: Debug Any CPU ------
4> FaturaServiceTests -> G:\GitProjects\Arles\ARLESApplication\ARLESServer\ArlesUnitTests\FaturaServiceTests\bin\Debug\FaturaServiceTests.dll
7> BusinessServicesTests -> G:\GitProjects\Arles\ARLESApplication\ARLESServer\ArlesUnitTests\BusinessServicesTests\bin\Debug\BusinessServicesTests.dll
5> EntegrasyonServiceTests -> G:\GitProjects\Arles\ARLESApplication\ARLESServer\ArlesUnitTests\EntegrasyonServiceTests\bin\Debug\EntegrasyonServiceTests.dll
6> CachingTests -> G:\GitProjects\Arles\ARLESApplication\ARLESServer\ArlesUnitTests\CachingTests\bin\Debug\CachingTests.dll
8> AnaVeriServiceTests -> G:\GitProjects\Arles\ARLESApplication\ARLESServer\ArlesUnitTests\AnaVeriServiceTests\bin\Debug\AnaVeriServiceTests.dll
========== Build: 8 succeeded, 0 failed, 10 up-to-date, 0 skipped ==========

Fine Code Coverage : ================================== START ==================================

Fine Code Coverage : Ensure Work Folder Exists (AnaVeriServiceTests)

Fine Code Coverage : Synchronize Output Files To Work Folder (AnaVeriServiceTests)

Fine Code Coverage : Run Coverage Tool (AnaVeriServiceTests)

Fine Code Coverage : OpenCover Run (AnaVeriServiceTests) Arguments
-register:path32
-mergebyhash
-hideskipped:all
"-target:C:\Users\nsentuna\AppData\Local\FineCodeCoverage\msTestPlatform\tools\net451\Common7\IDE\Extensions\TestPlatform\vstest.console.exe"
"-excludebyfile:**/Migrations/*"
"-excludebyattribute:GeneratedCode"
"-targetargs:G:\GitProjects\Arles\ARLESApplication\ARLESServer\ArlesUnitTests\AnaVeriServiceTests\bin\fine-code-coverage\AnaVeriServiceTests.dll"
"-output:G:\GitProjects\Arles\ARLESApplication\ARLESServer\ArlesUnitTests\AnaVeriServiceTests\bin\fine-code-coverage_outputfolder_cover.tool.xml"

Fine Code Coverage : OpenCover Run (AnaVeriServiceTests)
Executing: C:\Users\nsentuna\AppData\Local\FineCodeCoverage\msTestPlatform\tools\net451\Common7\IDE\Extensions\TestPlatform\vstest.console.exe
Microsoft (R) Test Execution Command Line Tool Version 16.7.1
Copyright (c) Microsoft Corporation. All rights reserved.

Starting test execution, please wait...

A total of 1 test files matched the specified pattern.
? AvPerformansKumpanyaDonusumListeleTest [23s 26ms]
? AvPerformansKumpanyaDonusumListeleTest (1,1,0) [22s 824ms]
? AvPerformansKumpanyaDonusumListeleTest (87,87,1) [97ms]
? AvPerformansKumpanyaDonusumListeleTest (350,350,0) [68ms]
? FTPFileCheckSendMail [161ms]
? FTPFileCheckSendMail (100,TEST FTP,TEST KOD,TEST PORT) [160ms]

Test Run Successful.
Total tests: 4
Passed: 4
Total time: 24,7199 Seconds
Committing...
Visited Classes 14 of 1682 (0.83)
Visited Methods 53 of 16381 (0.32)
Visited Points 275 of 91753 (0.30)
Visited Branches 91 of 38893 (0.23)

==== Alternative Results (includes all methods including those without corresponding source) ====
Alternative Visited Classes 14 of 1933 (0.72)
Alternative Visited Methods 53 of 18552 (0.29)

Fine Code Coverage : Ensure Work Folder Exists (BusinessServicesTests)

Fine Code Coverage : Synchronize Output Files To Work Folder (BusinessServicesTests)

Fine Code Coverage : Run Coverage Tool (BusinessServicesTests)

Fine Code Coverage : OpenCover Run (BusinessServicesTests) Arguments
-register:path32
-mergebyhash
-hideskipped:all
"-target:C:\Users\nsentuna\AppData\Local\FineCodeCoverage\msTestPlatform\tools\net451\Common7\IDE\Extensions\TestPlatform\vstest.console.exe"
"-excludebyfile:**/Migrations/*"
"-excludebyattribute:GeneratedCode"
"-targetargs:G:\GitProjects\Arles\ARLESApplication\ARLESServer\ArlesUnitTests\BusinessServicesTests\bin\fine-code-coverage\BusinessServicesTests.dll"
"-output:G:\GitProjects\Arles\ARLESApplication\ARLESServer\ArlesUnitTests\BusinessServicesTests\bin\fine-code-coverage_outputfolder_cover.tool.xml"

Fine Code Coverage : OpenCover Run (BusinessServicesTests)
Executing: C:\Users\nsentuna\AppData\Local\FineCodeCoverage\msTestPlatform\tools\net451\Common7\IDE\Extensions\TestPlatform\vstest.console.exe
Microsoft (R) Test Execution Command Line Tool Version 16.7.1
Copyright (c) Microsoft Corporation. All rights reserved.

Starting test execution, please wait...

A total of 1 test files matched the specified pattern.
? StoktanCikmisOpEkipmanTarihceDetayVgmEkleTest [21s 717ms]
? StoktanCikmisOpEkipmanTarihceDetayVgmEkleTest (8062144,782,3,93,17,15.06.2020,TartanTest,1,781,12500,Ayn๏ฟฝ tarihte veya daha sonraki bir tarihte stokta olmayan bir konteyner ile i๏ฟฝlem yapamazs๏ฟฝn๏ฟฝz) [20s 683ms]
? StoktanCikmisOpEkipmanTarihceDetayVgmEkleTest (8062144,782,3,93,17,29.05.2020,TartanTest,1,781,12500,0) [1s 22ms]
? VeriTransferiKumpanyaDevirTest [452ms]
? VeriTransferiKumpanyaDevirTest (1,MSCU8541224,MSC,HAPAG,23.06.2020 01:00:00,40HC,282,Talep tarihi 1 aydan eski olan bookinge yeni ekipman eklenemez.) [448ms]
? VeriTransferiKumpanyaDevirTest (1,MSCU8541224,,HAPAG,23.06.2020 01:00:00,40HC,282,Sat๏ฟฝrda bo๏ฟฝ alanlar var!) [1ms]
? VeriTransferiKumpanyaDevirTest (1,,MSC,HAPAG,23.06.2020 01:00:00,40HC,282,Sat๏ฟฝrda bo๏ฟฝ alanlar var!) [1ms]
? ExcelVeriTransferiMuayeneHareketiEkleTest [1s 191ms]
? ExcelVeriTransferiMuayeneHareketiEkleTest (1,MSCU8541224,123456,MUAYENE,23.06.2020 01:00:00,Muayene,282,Detay Tipi MUA olarak girilmelidir!) [414ms]
? ExcelVeriTransferiMuayeneHareketiEkleTest (1,MSCU8541224,123456,MUA,23.06.2020 01:00:00,Muayene,282,MSCU8541224: Tarih๏ฟฝesi kapanm๏ฟฝ๏ฟฝ bir ekipmanda de๏ฟฝi๏ฟฝiklik yap๏ฟฝlamaz.) [777ms]
? TahliyeEdilebilirTest [22ms]
? TahliyeEdilebilirTest (0,23.06.2020 01:00:00,23.06.2020 01:00:00,23.06.2020 01:00:00,23.06.2020 01:00:00,True) [7ms]
? TahliyeEdilebilirTest (0,22.06.2020 01:00:00,23.06.2020 01:00:00,23.06.2020 01:00:00,23.06.2020 01:00:00,False) [2ms]
? TahliyeEdilebilirTest (0,22.06.2020 01:00:00,23.06.2020 01:00:00,23.06.2020 01:00:00,23.06.2020 01:00:00,False) [2ms]
? TahliyeEdilebilirTest (1,23.06.2020 01:00:00,23.06.2020 01:00:00,23.06.2020 01:00:00,23.06.2020 01:00:00,True) [4ms]
? TahliyeEdilebilirTest (1,22.06.2020 01:00:00,23.06.2020 01:00:00,23.06.2020 01:00:00,23.06.2020 01:00:00,False) [2ms]
? TahliyeEdilebilirTest (1,22.06.2020 01:00:00,23.06.2020 01:00:00,23.06.2020 01:00:00,23.06.2020 01:00:00,False) [2ms]
? BilgiKoduAktarTest [1s 630ms]
? BilgiKoduAktarTest (1,HLXU4619000,SLK,23.06.2020 01:00:00,,282,Ba๏ฟฝar๏ฟฝl๏ฟฝ) [862ms]
? BilgiKoduAktarTest (1,MSCU8541224,SLK,23.06.2020 01:00:00,,282,MSCU8541224: Tarih๏ฟฝesi kapanm๏ฟฝ๏ฟฝ bir ekipmanda de๏ฟฝi๏ฟฝiklik yap๏ฟฝlamaz.) [484ms]
? BilgiKoduAktarTest (1,MSCU8541224,SLK1,23.06.2020 01:00:00,,282,Tarihce detay durum kodu sistem ile uyumlu de๏ฟฝildir.) [282ms]
? TruckerFormListeleTest [308ms]
? TruckerFormListeleTest (2020,197587,True) [100ms]
? TruckerFormListeleTest (2020,197588,True) [71ms]
? TruckerFormListeleTest (2020,197589,True) [66ms]
? TruckerFormListeleTest (2020,196646,True) [67ms]
? TruckerFormListeleTest (2020,0,False) [2ms]
? ExcelVeriTransferiGeldigiGittigiYerTest [850ms]
? ExcelVeriTransferiGeldigiGittigiYerTest (1,ARKU2337202,01.10.2020 21:asd0,GEL๏ฟฝ๏ฟฝ,IZMIR ALSANCAK,73312,Girilen tarih format๏ฟฝ hatal๏ฟฝd๏ฟฝr) [44ms]
? ExcelVeriTransferiGeldigiGittigiYerTest (1,ARKU2337202,01.10.2020 21:28:00,GEL๏ฟฝ๏ฟฝ,IZMIR ALSANCAK,73312,Ba๏ฟฝar๏ฟฝl๏ฟฝ) [511ms]
? ExcelVeriTransferiGeldigiGittigiYerTest (1,ARKU2337202,01.10.2020 21:28:00,,IZMIR ALSANCAK,73312,Girilen tarihte konteyner bulunamad๏ฟฝ) [152ms]
? ExcelVeriTransferiGeldigiGittigiYerTest (1,,01.10.2020 21:28:00,G๏ฟฝD๏ฟฝ๏ฟฝ,IZMIR ALSANCAK,73312,Ekipman Numaras๏ฟฝ Bo๏ฟฝ Girilmi๏ฟฝ. ) [4ms]
? ExcelVeriTransferiGeldigiGittigiYerTest (1,ARKU2337202,01.10.2020 21:28:00,GEL๏ฟฝ๏ฟฝ,,73312,Lokasyon zorunludur) [137ms]
? ExcelVeriShiftingAktarimTest [1s 64ms]
? ExcelVeriShiftingAktarimTest (1,GG,Konteyner,,ARKU2337202,20BK,19.10.2020 23:28:00,19.10.2020 23:27:00,,,,,,MHC13,311,113600,Ba๏ฟฝlang๏ฟฝ๏ฟฝ tarihi biti๏ฟฝ tarihinden b๏ฟฝy๏ฟฝk olamaz) [263ms]
? ExcelVeriShiftingAktarimTest (1,GG,Konteyner,,ARKU2337202,20BK,19.10.2020 23:28:00,19.10.2020 23:29:00,,,,,,,311,113600,Vinc Bilgisi Yok) [194ms]
? ExcelVeriShiftingAktarimTest (1,GG,Konteyner,,ARKU2337202,13BK,19.10.2020 23:28:00,19.10.2020 23:29:00,,,,,,MHC13,311,113600,๏ฟฝsokodu hatali..) [210ms]
? ExcelVeriShiftingAktarimTest (1,GG,Konteyner,,ARKU2337202,20BK,19.10.2020 23:28:00,19.10.2020 23:29:00,,,,,,MHC13,311,113600,Seferin ger๏ฟฝekle๏ฟฝen gidi๏ฟฝ tarihi girilmi๏ฟฝ.Hareketi i๏ฟฝlemek i๏ฟฝin iptal edilmesi gerekmektedir.) [394ms]
? GetBiztalkFtpCheckInfoTest [72ms]
? MuhurIslemTipiDondurTest [3ms]
? MuhurIslemTipiDondurTest (DEF,Defimugasyon) [2ms]
? MuhurIslemTipiDondurTest (ESL,ExportSeal) [< 1ms]
? MuhurIslemTipiDondurTest (D,IcDolum) [< 1ms]
? MuhurIslemTipiDondurTest (C,KapiCikis) [< 1ms]
? MuhurIslemTipiDondurTest (G,KapiGiris) [< 1ms]
? MuhurIslemTipiDondurTest (BX,KismiIcBosaltma) [< 1ms]
? MuhurIslemTipiDondurTest (Dx,KismiIcDolum) [< 1ms]
? MuhurIslemTipiDondurTest (MUA,Muayene) [< 1ms]
? MuhurIslemTipiDondurTest (ES2,OTMuhur) [< 1ms]
? MuhurIslemTipiDondurTest (TES,TamTespit) [< 1ms]
? MuhurIslemTipiDondurTest (DVR,) [< 1ms]
? MuhurIslemTipiDondurTest (DIsci,) [< 1ms]
? MuhurIslemTipiDondurTest (EIR,) [< 1ms]
? MuhurIslemTipiDondurTest (ISL,) [< 1ms]
? MuhurIslemTipiDondurTest (VGM,) [< 1ms]

Test Run Successful.
Total tests: 46
Passed: 46
Total time: 31,0356 Seconds
Committing...
Visited Classes 48 of 1684 (2.85)
Visited Methods 228 of 16389 (1.39)
Visited Points 1821 of 92009 (1.98)
Visited Branches 619 of 38921 (1.59)

==== Alternative Results (includes all methods including those without corresponding source) ====
Alternative Visited Classes 48 of 1935 (2.48)
Alternative Visited Methods 228 of 18562 (1.23)

Fine Code Coverage : Ensure Work Folder Exists (CachingTests)

Fine Code Coverage : Synchronize Output Files To Work Folder (CachingTests)

Fine Code Coverage : Run Coverage Tool (CachingTests)

Fine Code Coverage : OpenCover Run (CachingTests) Arguments
-register:path32
-mergebyhash
-hideskipped:all
"-target:C:\Users\nsentuna\AppData\Local\FineCodeCoverage\msTestPlatform\tools\net451\Common7\IDE\Extensions\TestPlatform\vstest.console.exe"
"-excludebyfile:**/Migrations/*"
"-excludebyattribute:GeneratedCode"
"-targetargs:G:\GitProjects\Arles\ARLESApplication\ARLESServer\ArlesUnitTests\CachingTests\bin\fine-code-coverage\CachingTests.dll"
"-output:G:\GitProjects\Arles\ARLESApplication\ARLESServer\ArlesUnitTests\CachingTests\bin\fine-code-coverage_outputfolder_cover.tool.xml"

Fine Code Coverage : OpenCover Run (CachingTests)
Executing: C:\Users\nsentuna\AppData\Local\FineCodeCoverage\msTestPlatform\tools\net451\Common7\IDE\Extensions\TestPlatform\vstest.console.exe
Microsoft (R) Test Execution Command Line Tool Version 16.7.1
Copyright (c) Microsoft Corporation. All rights reserved.

Starting test execution, please wait...

A total of 1 test files matched the specified pattern.
? GetKumpanyaEntegrasyonTest [4s 851ms]
? GetKumpanyaEntegrasyonTest (YML) [4s 816ms]
? GetKumpanyaEntegrasyonTest (Hapag) [< 1ms]
? GetKumpanyaEntegrasyonTest (BSA) [< 1ms]
? GetKumpanyaEntegrasyonTest (EVERGREEN) [< 1ms]
? GetKumpanyaEntegrasyonTest (MSC) [< 1ms]
? GetKumpanyaEntegrasyonTest (COSCO) [< 1ms]
? GetKumpanyaEntegrasyonTest (MEARSK) [< 1ms]
? GetKumpanyaEntegrasyonTest (CMA) [< 1ms]
? GetKumpanyaEntegrasyonTest (APL) [< 1ms]
? SetDefaultFTPInfoToCacheTest [2ms]
? SetDefaultFTPInfoToCacheTest (DP WORLD SFTP) [2ms]
? SetDefaultFTPInfoToCacheTest (MSC COPARN FTP) [< 1ms]
? SetDefaultFTPInfoToCacheTest (ftp.arkas.com) [< 1ms]
? GetFTPFileCheckInfosTest [8ms]
? GetFTPFileCheckInfosTest (0,0,1,DP WORLD SFTP) [5ms]
? GetFTPFileCheckInfosTest (100,0,2,DP WORLD SFTP) [< 1ms]
? GetFTPFileCheckInfosTest (100,100,3,DP WORLD SFTP) [< 1ms]
? GetFTPFileCheckInfosTest (150,100,4,DP WORLD SFTP) [< 1ms]
? GetFTPFileCheckInfosTest (160,150,5,DP WORLD SFTP) [< 1ms]
? GetFTPFileCheckInfosTest (0,0,1,MSC COPARN FTP) [< 1ms]
? GetFTPFileCheckInfosTest (100,0,2,MSC COPARN FTP) [< 1ms]
? GetFTPFileCheckInfosTest (100,100,3,MSC COPARN FTP) [< 1ms]
? GetFTPFileCheckInfosTest (101,100,4,MSC COPARN FTP) [< 1ms]
? GetFTPFileCheckInfosTest (102,101,5,MSC COPARN FTP) [< 1ms]
? GetFTPFileCheckInfosTest (0,0,1,ftp.arkas.com) [< 1ms]
? GetFTPFileCheckInfosTest (100,0,2,ftp.arkas.com) [< 1ms]
? GetFTPFileCheckInfosTest (101,100,3,ftp.arkas.com) [< 1ms]
? GetFTPFileCheckInfosTest (102,101,4,ftp.arkas.com) [< 1ms]
? GetFTPFileCheckInfosTest (103,102,5,ftp.arkas.com) [< 1ms]
? GetFTPFileCheckInfosTest (104,103,6,ftp.arkas.com) [< 1ms]

Test Run Successful.
Total tests: 28
Passed: 28
Total time: 8,6921 Seconds
Committing...
Visited Classes 10 of 1366 (0.73)
Visited Methods 38 of 11461 (0.33)
Visited Points 156 of 28425 (0.55)
Visited Branches 57 of 12653 (0.45)

==== Alternative Results (includes all methods including those without corresponding source) ====
Alternative Visited Classes 10 of 1546 (0.65)
Alternative Visited Methods 38 of 12688 (0.3)

Fine Code Coverage : Ensure Work Folder Exists (DistributableTests)

Fine Code Coverage : Synchronize Output Files To Work Folder (DistributableTests)

Fine Code Coverage : Run Coverage Tool (DistributableTests)

Fine Code Coverage : OpenCover Run (DistributableTests) Arguments
-register:path32
-mergebyhash
-hideskipped:all
"-target:C:\Users\nsentuna\AppData\Local\FineCodeCoverage\msTestPlatform\tools\net451\Common7\IDE\Extensions\TestPlatform\vstest.console.exe"
"-excludebyfile:**/Migrations/*"
"-excludebyattribute:GeneratedCode"
"-targetargs:G:\GitProjects\Arles\ARLESApplication\ARLESServer\ArlesUnitTests\DistributableTests\bin\fine-code-coverage\DistributableTests.dll"
"-output:G:\GitProjects\Arles\ARLESApplication\ARLESServer\ArlesUnitTests\DistributableTests\bin\fine-code-coverage_outputfolder_cover.tool.xml"

Fine Code Coverage : OpenCover Run (DistributableTests)
Executing: C:\Users\nsentuna\AppData\Local\FineCodeCoverage\msTestPlatform\tools\net451\Common7\IDE\Extensions\TestPlatform\vstest.console.exe
Microsoft (R) Test Execution Command Line Tool Version 16.7.1
Copyright (c) Microsoft Corporation. All rights reserved.

Starting test execution, please wait...

A total of 1 test files matched the specified pattern.
? ToBooleanSafeTest [2s 622ms]
? ToBooleanSafeTest (hayir,False) [2s 582ms]
? ToBooleanSafeTest (hayIr,False) [< 1ms]
? ToBooleanSafeTest (NO,False) [< 1ms]
? ToBooleanSafeTest (no,False) [< 1ms]
? ToBooleanSafeTest (0,False) [< 1ms]
? ToBooleanSafeTest (0,False) [< 1ms]
? ToBooleanSafeTest ( ,False) [< 1ms]
? ToBooleanSafeTest (,False) [< 1ms]
? ToBooleanSafeTest (1,True) [< 1ms]
? ToBooleanSafeTest (1,True) [< 1ms]
? ToBooleanSafeTest (serkan,False) [< 1ms]
? ToBooleanSafeTest (yes,True) [< 1ms]
? ToBooleanSafeTest (evet,True) [< 1ms]
? ToBooleanSafeTest (EVET,True) [< 1ms]
? ToBooleanSafeTest (asdEVET,False) [< 1ms]
? ToBooleanSafeTest (True,True) [< 1ms]
? ToBooleanSafeTest (true,True) [< 1ms]
? ToBooleanSafeTest (False,False) [< 1ms]
? ToBooleanSafeTest (false,False) [< 1ms]

Test Run Successful.
Total tests: 19
Passed: 19
Total time: 3,8886 Seconds
Committing...
Visited Classes 3 of 1352 (0.22)
Visited Methods 6 of 11321 (0.05)
Visited Points 28 of 27597 (0.10)
Visited Branches 46 of 12251 (0.38)

==== Alternative Results (includes all methods including those without corresponding source) ====
Alternative Visited Classes 3 of 1530 (0.2)
Alternative Visited Methods 6 of 12535 (0.05)

Fine Code Coverage : Ensure Work Folder Exists (EntegrasyonServiceTests)

Fine Code Coverage : Synchronize Output Files To Work Folder (EntegrasyonServiceTests)

Fine Code Coverage : Run Coverage Tool (EntegrasyonServiceTests)

Fine Code Coverage : OpenCover Run (EntegrasyonServiceTests) Arguments
-register:path32
-mergebyhash
-hideskipped:all
"-target:C:\Users\nsentuna\AppData\Local\FineCodeCoverage\msTestPlatform\tools\net451\Common7\IDE\Extensions\TestPlatform\vstest.console.exe"
"-excludebyfile:**/Migrations/*"
"-excludebyattribute:GeneratedCode"
"-targetargs:G:\GitProjects\Arles\ARLESApplication\ARLESServer\ArlesUnitTests\EntegrasyonServiceTests\bin\fine-code-coverage\EntegrasyonServiceTests.dll"
"-output:G:\GitProjects\Arles\ARLESApplication\ARLESServer\ArlesUnitTests\EntegrasyonServiceTests\bin\fine-code-coverage_outputfolder_cover.tool.xml"

Fine Code Coverage : OpenCover Run (EntegrasyonServiceTests)
Executing: C:\Users\nsentuna\AppData\Local\FineCodeCoverage\msTestPlatform\tools\net451\Common7\IDE\Extensions\TestPlatform\vstest.console.exe
Microsoft (R) Test Execution Command Line Tool Version 16.7.1
Copyright (c) Microsoft Corporation. All rights reserved.

Starting test execution, please wait...

A total of 1 test files matched the specified pattern.
? CodecoHareketiEkleTest [27s 435ms]
? CodecoHareketiEkleTest (CAUI0000001.xml,Successful) [24s 450ms]
? CodecoHareketiEkleTest (HLXU0000001.xml,Successful) [2s 972ms]
? KapiGirisMukerrerMuhurKontroluTesti [6s 468ms]
? KapiGirisMukerrerMuhurKontroluTesti (KapiGirisMukerrerMuhurKontroluHMSU0000001.xml,KapiGirisBookingHMSU0000001.xml,Successful) [6s 468ms]
? KapiGirisVeVgmTesti [8s 788ms]
? KapiGirisVeVgmTesti (EISU9998887GINArlesXmlFile.xml,EISU9998887_booking_GIN.xml,EISU9998887VGMTArlesXmlFile.xml,Successful) [8s 788ms]
? IcDolumBookingTesti [23s 176ms]
? IcDolumBookingTesti (TCNU0000001IthalBosKapiGiris.xml,TCNU0000001IcDolumBooking.xml,TCNU0000001IcDolumCodeco.xml,Successful) [11s 760ms]
? IcDolumBookingTesti (IcDolumHBLU0000001_KapiGirisBos.xml,IcDolumHBLU0000001_54202039TestBooking.xml,IcDolumHLBU0000001_54202039TestHareket.xml,Successful) [11s 414ms]
? CoprarIthalatManifestoEkleTesti [14s 151ms]
? CoprarIthalatManifestoEkleTesti (CoprarManifestoEkle_MEDU0000001_Tahliye.xml,MEDU,0000001,1,MSC ANAHITA,AO037ATEST,D5OW5,TRIZM,2020,09,22,MEDUAS00TEST01,Ithalat,ZIM159716,True) [7s 842ms]
? CoprarIthalatManifestoEkleTesti (CoprarManifestoEkle_MEDU0000002_Tahliye.xml,MEDU,0000002,1,MSC ANAHITA,AO037ATEST,D5OW5,TRIZM,2020,09,22,MEDUAS00TEST02,Ithalat,ZIM159716,True) [6s 307ms]
? CoprarIhracatManifestoEkleTesti [11s 651ms]
? CoprarIhracatManifestoEkleTesti (CoprarManifestoEkle_MEDU0000003_KapiGirisBooking.xml,CoprarManifestoEkle_MEDU0000003_KapiGiris.xml,CoprarManifestoEkle_MEDU0000003_Yukleme.xml,MEDU,0000003,1,MSC ANAHITA,AO037ATEST,D5OW5,TRIZM,2020,09,22,MEDUAS00TEST03,Ihracat,ZIM159716TEST,True) [11s 650ms]
? AcenteMusteriIdGetirTest [1s 558ms]
? AcenteMusteriIdGetirTest (TRIZM,ARKASLINE,11806) [250ms]
? AcenteMusteriIdGetirTest (TRGEM,ARKASLINE,11806) [127ms]
? AcenteMusteriIdGetirTest (TRMER,ARKASLINE,11806) [128ms]
? AcenteMusteriIdGetirTest (TRBOR,ARKASLINE,11806) [126ms]
? AcenteMusteriIdGetirTest (TRIZM,Hapag,25691) [128ms]
? AcenteMusteriIdGetirTest (TRGEM,Hapag,25691) [125ms]
? AcenteMusteriIdGetirTest (TRMER,Hapag,25691) [407ms]
? AcenteMusteriIdGetirTest (TRBOR,Hapag,25691) [131ms]
? AcenteMusteriIdGetirTest (TRIZM,MSC,3785) [131ms]
? ArlesAliciLimanLokasyonIdGetirTest [518ms]
? ArlesAliciLimanLokasyonIdGetirTest (TRIZM,282) [67ms]
? ArlesAliciLimanLokasyonIdGetirTest (TRGEM,469) [65ms]
? ArlesAliciLimanLokasyonIdGetirTest (TRMER,311) [63ms]
? ArlesAliciLimanLokasyonIdGetirTest (TRBOR,63319) [63ms]
? ArlesAliciLimanLokasyonIdGetirTest (TREVY,63400) [64ms]
? ArlesAliciLimanLokasyonIdGetirTest (TREGE,76445) [63ms]
? ArlesAliciLimanLokasyonIdGetirTest (TRHAY,608) [63ms]
? ArlesAliciLimanLokasyonIdGetirTest (TRRDP,73312) [65ms]
? ArlesAvLimaniIdGetirTest [523ms]
? ArlesAvLimaniIdGetirTest (TRIZM,282) [64ms]
? ArlesAvLimaniIdGetirTest (TRGEM,469) [70ms]
? ArlesAvLimaniIdGetirTest (TRMER,311) [63ms]
? ArlesAvLimaniIdGetirTest (TRBOR,63319) [63ms]
? ArlesAvLimaniIdGetirTest (TREVY,63400) [68ms]
? ArlesAvLimaniIdGetirTest (TREGE,76445) [63ms]
? ArlesAvLimaniIdGetirTest (TRHAY,608) [64ms]
? ArlesAvLimaniIdGetirTest (TRRDP,73312) [63ms]
? KumpanyaLokasyonAcenteMusteriIdGetirTest [1s 750ms]
? KumpanyaLokasyonAcenteMusteriIdGetirTest (Adaport,ARKASLINE,165435) [71ms]
? KumpanyaLokasyonAcenteMusteriIdGetirTest (Antalya,ARKASLINE,11806) [73ms]
? KumpanyaLokasyonAcenteMusteriIdGetirTest (APMTerminal,ARKASLINE,11806) [73ms]
? KumpanyaLokasyonAcenteMusteriIdGetirTest (ArkasEgyptDepot,ARKASLINE,12117) [74ms]
? KumpanyaLokasyonAcenteMusteriIdGetirTest (Borusan,ARKASLINE,11806) [74ms]
? KumpanyaLokasyonAcenteMusteriIdGetirTest (BorusanDepo,ARKASLINE,11806) [64ms]
? KumpanyaLokasyonAcenteMusteriIdGetirTest (Derince,ARKASLINE,11806) [64ms]
? KumpanyaLokasyonAcenteMusteriIdGetirTest (DPWorldPort,ARKASLINE,11806) [63ms]
? KumpanyaLokasyonAcenteMusteriIdGetirTest (EgyptExtensionDepot,ARKASLINE,12117) [64ms]
? KumpanyaLokasyonAcenteMusteriIdGetirTest (Evyap,ARKASLINE,11806) [64ms]
? KumpanyaLokasyonAcenteMusteriIdGetirTest (Gemport,ARKASLINE,11806) [64ms]
? KumpanyaLokasyonAcenteMusteriIdGetirTest (GemportDepo,ARKASLINE,11806) [64ms]
? KumpanyaLokasyonAcenteMusteriIdGetirTest (Haydarpasa,ARKASLINE,11806) [64ms]
? KumpanyaLokasyonAcenteMusteriIdGetirTest (IskenderunAssan,ARKASLINE,11806) [64ms]
? KumpanyaLokasyonAcenteMusteriIdGetirTest (IskenderunLimak,ARKASLINE,11806) [65ms]
? KumpanyaLokasyonAcenteMusteriIdGetirTest (Izmir,ARKASLINE,11806) [76ms]
? KumpanyaLokasyonAcenteMusteriIdGetirTest (Kumport,ARKASLINE,11806) [67ms]
? KumpanyaLokasyonAcenteMusteriIdGetirTest (Limas,ARKASLINE,11806) [66ms]
? KumpanyaLokasyonAcenteMusteriIdGetirTest (Mardas,ARKASLINE,11806) [64ms]
? KumpanyaLokasyonAcenteMusteriIdGetirTest (Mersin,ARKASLINE,11806) [64ms]
? KumpanyaLokasyonAcenteMusteriIdGetirTest (Morocco,ARKASLINE,57958) [65ms]
? KumpanyaLokasyonAcenteMusteriIdGetirTest (Nemport,ARKASLINE,11806) [65ms]
? KumpanyaLokasyonAcenteMusteriIdGetirTest (Rodaport,ARKASLINE,11806) [65ms]
? KumpanyaLokasyonAcenteMusteriIdGetirTest (RodaportDepo,ARKASLINE,11806) [65ms]
? KumpanyaLokasyonAcenteMusteriIdGetirTest (Samsun,ARKASLINE,11806) [65ms]
? KumpanyaLokasyonAcenteMusteriIdGetirTest (TceEge,ARKASLINE,11806) [67ms]
? LokasyonIdBasicGetirTest [586ms]
? LokasyonIdBasicGetirTest (TRIZM,282) [132ms]
? LokasyonIdBasicGetirTest (TRGEM,469) [65ms]
? LokasyonIdBasicGetirTest (TRMER,311) [64ms]
? LokasyonIdBasicGetirTest (TRBOR,63319) [66ms]
? LokasyonIdBasicGetirTest (TREVY,63400) [64ms]
? LokasyonIdBasicGetirTest (TREGE,76445) [64ms]
? LokasyonIdBasicGetirTest (TRHAY,608) [64ms]
? LokasyonIdBasicGetirTest (TRRDP,73312) [64ms]
? YNAIthalatManifestoEkleTesti [1m 38s]
? YNAIthalatManifestoEkleTesti (YNAManifestoEkle.xml) [3s 708ms]
? YNAIthalatManifestoEkleTesti (YNAManifestoEkleGulbenizA.xml) [1m 34s]

Test Run Successful.
Total tests: 70
Passed: 70
Total time: 3,3086 Minutes
Committing...
Visited Classes 136 of 1682 (8.09)
Visited Methods 1257 of 16394 (7.67)
Visited Points 8328 of 91980 (9.05)
Visited Branches 3092 of 38912 (7.95)

==== Alternative Results (includes all methods including those without corresponding source) ====
Alternative Visited Classes 136 of 1933 (7.04)
Alternative Visited Methods 1257 of 18565 (6.77)

Fine Code Coverage : Ensure Work Folder Exists (FaturaServiceTests)

Fine Code Coverage : Synchronize Output Files To Work Folder (FaturaServiceTests)

Fine Code Coverage : Run Coverage Tool (FaturaServiceTests)

Fine Code Coverage : OpenCover Run (FaturaServiceTests) Arguments
-register:path32
-mergebyhash
-hideskipped:all
"-target:C:\Users\nsentuna\AppData\Local\FineCodeCoverage\msTestPlatform\tools\net451\Common7\IDE\Extensions\TestPlatform\vstest.console.exe"
"-excludebyfile:**/Migrations/*"
"-excludebyattribute:GeneratedCode"
"-targetargs:G:\GitProjects\Arles\ARLESApplication\ARLESServer\ArlesUnitTests\FaturaServiceTests\bin\fine-code-coverage\FaturaServiceTests.dll"
"-output:G:\GitProjects\Arles\ARLESApplication\ARLESServer\ArlesUnitTests\FaturaServiceTests\bin\fine-code-coverage_outputfolder_cover.tool.xml"

image

Not showing coverage on all projects on big codebase (NUnit v3)

Installed product versions

  • Visual Studio: 2019 Community
  • This extension: latest

Description

Code coverage is not shown on reports neither on the green/red bar lines on the margin on lots of projects from a big codebase (50 projs).

Only covers some projs, around 1/3

Steps to recreate

  1. Have a big codebase (or just copy the same proj multiple times)
  2. Have some test for all the projs
  3. Run the tests
  4. Check code coverage (margin lines & reports)

Current behavior

Not showing coverage for all the assemblies (none excluded)

Expected behavior

Should consider code coverage from all the assemblies

Side Notes

Also, I'm using NUnit 3, if it helps to know
Btw, great product!

Multi-framework project does not work

Installed product versions

  • Visual Studio: [Community 16.8.3]
  • This extension: [example 1.1.39]

Description

There are two major issues with regard to multi-frameworks sdk style project.

  1. FileSynchronization can fail to copy necessary files - test does not run and error messages
    foreach (var fileToCopy in srceFiles.Except(destFiles(), FileComparer.Singleton))

There are two reasons for this.
The main issue is that the destination folder for frameworks in multi framework is the same - e.g .../Debug/fine-code-coverage

The second is the equality comparison - the hash code can be the same for different framework files.
ComparableFile
public ComparableFile(FileInfo fileInfo, string relativePath) { FileInfo = fileInfo; RelativePath = relativePath; hashCode = string.Format("{0}|{1}|{2}", RelativePath, FileInfo.Length, FileInfo.LastWriteTimeUtc.Ticks).GetHashCode(); }
This could be resolved by using the full path although this solution does not resolve issue 2.

  1. Running tests for multiple frameworks does not merge the results.
    This again is due to shared folder.
    The problematic code
    project.WorkFolder = Path.Combine(Path.GetDirectoryName(defaultOutputFolder), "fine-code-coverage");

So when the FCCEngine.ReloadCoverage
`

project.WorkOutputFolder = Path.Combine(project.WorkFolder, "_outputfolder");
project.CoverToolOutputFile = Path.Combine(project.WorkOutputFolder, "_cover.tool.xml");
...
var coverOutputFiles = projects
.Select(x => x.CoverToolOutputFile)
.ToArray();
ReportGeneratorUtil.RunReportGenerator(coverOutputFiles, darkMode, out var unifiedHtmlFile, out var unifiedXmlFile, true);
`
The report generator is asked for a unified xml file for the same ( last generated) file path.

The solution would be to replace
project.WorkFolder = Path.Combine(Path.GetDirectoryName(defaultOutputFolder), "fine-code-coverage");
with

var legacyWorkFolder = Path.Combine(Path.GetDirectoryName(defaultOutputFolder), "fine-code-coverage");
try
{
	Directory.Delete(legacyWorkFolder, true);
}
catch
{
	// ignore
}
project.WorkFolder = Path.Combine(Path.GetDirectoryName(defaultOutputFolder), $"fine-code-coverage-{project.ProjectName}");
projects.Add(project);

Failure when working directory has a space in it

Installed product versions

  • Visual Studio: Microsoft Visual Studio Professional 2019
  • This extension: 1.1.39

Description

It appears that when the working directory has as space in it, that the OpenCover command fails.

Example output:

Fine Code Coverage : ================================== START ==================================
Fine Code Coverage : Ensure Work Folder Exists (MyUnitTests)
Fine Code Coverage : Synchronize Output Files To Work Folder (MyUnitTests)
Fine Code Coverage : Run Coverage Tool (MyUnitTests)
Fine Code Coverage : OpenCover Run (MyUnitTests) Arguments 
 -mergebyhash 
 -hideskipped:all 
 -register:path32 
 "-target:C:\Users\me\AppData\Local\FineCodeCoverage\msTestPlatform\tools\net451\Common7\IDE\Extensions\TestPlatform\vstest.console.exe" 
 "-excludebyfile:**/Migrations/*" 
 "-excludebyattribute:(*.ExcludeFromCodeCoverage)|(*.ExcludeFromCodeCoverageAttribute)|(*.ExcludeFromCoverage)|(*.ExcludeFromCoverageAttribute)|(*.GeneratedCode)|(*.GeneratedCodeAttribute)" 
 "-targetargs:C:\DEV\My Work\MyUnitTests\bin\fine-code-coverage\MyUnitTests.dll" 
 "-output:C:\DEV\My Work\MyUnitTests\bin\fine-code-coverage\_outputfolder\_cover.tool.xml"
Fine Code Coverage : OpenCover Run (MyUnitTests)
C:\DEV\My Work\MyUnitTests\bin\fine-code-coverage>"C:\Users\me\AppData\Local\FineCodeCoverage\openCover\tools\OpenCover.Console.exe"  -mergebyhash   -hideskipped:all   -register:path32   "-target:C:\Users\me\AppData\Local\FineCodeCoverage\msTestPlatform\tools\net451\Common7\IDE\Extensions\TestPlatform\vstest.console.exe"   "-excludebyfile:**/Migrations/*"   "-excludebyattribute:(*.ExcludeFromCodeCoverage)|(*.ExcludeFromCodeCoverageAttribute)|(*.ExcludeFromCoverage)|(*.ExcludeFromCoverageAttribute)|(*.GeneratedCode)|(*.GeneratedCodeAttribute)"   "-targetargs:C:\DEV\My Work\MyUnitTests\bin\fine-code-coverage\MyUnitTests.dll"   "-output:C:\DEV\My Work\MyUnitTests\bin\fine-code-coverage\_outputfolder\_cover.tool.xml"   1>"C:\DEV\My Work\MyUnitTests\bin\fine-code-coverage\2541b640.bat.output" 
The test source file "C:\DEV\My" provided was not found.
Executing: C:\Users\me\AppData\Local\FineCodeCoverage\msTestPlatform\tools\net451\Common7\IDE\Extensions\TestPlatform\vstest.console.exe
Microsoft (R) Test Execution Command Line Tool Version 16.7.1
Copyright (c) Microsoft Corporation.  All rights reserved.
Committing...
No results, this could be for a number of reasons. The most common reasons are:
    1) missing PDBs for the assemblies that match the filter please review the
    output file and refer to the Usage guide (Usage.rtf) about filters.
    2) the profiler may not be registered correctly, please refer to the Usage
    guide and the -register switch.
Fine Code Coverage : ReportGenerator Run Arguments [reporttype:Cobertura] 
"-targetdir:C:\DEV\My Work\MyUnitTests\bin\fine-code-coverage\_outputfolder"
"-reports:C:\DEV\My Work\MyUnitTests\bin\fine-code-coverage\_outputfolder\_cover.tool.xml"
"-reporttypes:Cobertura"

Steps to recreate

  1. Make the path to your solution have a space in it. Example: C:\DEV\My Work\Solution.sln
  2. Run the tests using the Test Explorer

Current behavior

This seems to be a bug with OpenCover: OpenCover/opencover#140

Expected behavior

I'd expect FineCodeCoverage to work around this.

Looks like this can be done by using an environment variable in place of the path.

Side Notes

Partial coverage is shown even if the code is fully covered

Installed product versions

  • Visual Studio: 2019 Community (Version 16.7.4)
  • This extension: 1.0.78

Description

In some circumstances the code coverage reports entries as partial covered, even if they are full covered. The ReportGenerator tool does this coverage correctly, so it must be an issue with the presentation of the code coverage.

Steps to recreate

  1. Create a unit test project and apply this code:
        [Fact]
        public void TestIfChecksPartialCoverageThrowsException()
        {
            Assert.Throws<ArgumentNullException>(() => IfChecksPartialCoverage(null));
        }

        [Fact]
        public void TestIfChecksPartialCoverage()
        {
            Assert.Equal("blah", IfChecksPartialCoverage("blah"));
        }

        private static string IfChecksPartialCoverage(string something)
        {
            if (something is null)
            {
                throw new ArgumentNullException(nameof(something));
            }

            return something;
        }
  1. Run the unit tests
  2. Look at the code coverage markings.

Current behavior

The line if (something is null) is marked as partial covered.

Expected behavior

All lines should be marked as fully covered.

AssemblyAttribute project element to exclusion - change to property

I advise that you instead change to a property so as to avoid the visual studio warning
image

and to avoid the connection to an attribute that cannot be applied as an assembly attribute in a .Net Framework project. It is also explicit that this asssembly will be excluded from code coverage only when being run from the Fine Code Coverage addin.

Report links do not work when package has _ in name

Installed product versions

  • Visual Studio: [Community 16.8.3]
  • This extension: [example 1.1.39]

Description

Given a Test project that tests XUnit_Conditional_Fact with class ConditionalFact
When click ConditionalFact in the OutputToolWindowControl the ScriptManager.OpenFile will be called.
`

	public void OpenFile(string htmlFilePath, int file, int line)
	{
		// Note : There may be more than one file; e.g. in the case of partial classes

		var htmlFileName = Path.GetFileNameWithoutExtension(htmlFilePath);
		var sourceFiles = FCCEngine.GetSourceFilesFromReportGeneratorHtmlFileName(htmlFileName);

`
This is the htmlFilePath argument.
"C:\Users\tonyh\Source\Repos\XUnit_Conditional_Fact\Test\bin\Debug\net472\fine-code-coverage\_outputfolder\XUnit_Conditional_Fact_ConditionalFact.html"

htmlFileName becomes "XUnit_Conditional_Fact_ConditionalFact"

The problem arises in the FCCEngine.GetSourceFilesFromReportGeneratorHtmlFileName

`
public static string[] GetSourceFilesFromReportGeneratorHtmlFileName(string htmlFileNameWithoutExtension)
{
// Note : There may be more than one file; e.g. in the case of partial classes

		var html_file_tokens = htmlFileNameWithoutExtension.Split(new[] { '_' }, 2);
		var html_file_package = html_file_tokens.First();
		var html_file_class = $".{html_file_tokens.Last()}";

`
The code above gives the html_file_package as XUnit, html_file_class as ".Conditional_Fact_ConditionalFact" which is obviously incorrect.

Without knowing the Cobertura format and the transformation to html by the report generator I cannot provide a surefire correction to your code. In this particular instance this change would work

`

        var underscoreSeparatorIndex = htmlFileNameWithoutExtension.LastIndexOf('_');
        var html_file_package = htmlFileNameWithoutExtension.Substring(0,underscoreSeparatorIndex);
        var html_file_class = $".{htmlFileNameWithoutExtension.Substring(underscoreSeparatorIndex+1)}";

`

c# 8 switch expression always considered as not tested (red)

Installed product versions

  • Visual Studio: Microsoft Visual Studio Community 2019 Version 16.8.1
  • This extension: 1.1.16
  • Project Target Framework: .NET Core 3.1
  • Unit Test Framework: NUnit, NUnit3TestAdapter

Description

Replace this text with a short description

Steps to recreate

Use c# 8 switch expression.

  1. Create an enum
  2. Create the switch expression
    public enum InputType
    {
        Alpha,
        Numeric,
        AlphaNumeric,
    }

   public class MyClass
   {
        private InputType InputType { get; set; }

        private int SomeFunction()
        {
            return this.InputType switch
            {
                InputType.Alpha => 1,
                InputType.AlphaNumeric => 10,
                InputType.Numeric => 999,
                _ => throw new NotImplementedException(),
            };
        }
   }

Current behaviour

When creating this type of code, the coverage report is not taking into consideration the c# 8 switch expression. It cannot tell what part of the switch was called. The reported lines are always in red whatever the code case was used.

Expected behaviour

When creating this type of code, the coverage report should detect the c# 8 switch expression and evaluate the cases properly with green highlighting for the coverage report.

Feature request - Dark theme support

Installed product versions

  • Visual Studio: 2019 Professional
  • This extension: 1.0.78

Description

Extension background doesn't support Visual Studio's dark theme

Steps to recreate

  1. Configure Visual Studio to use the dark theme
  2. Install Fine Code
  3. Run tests to bring up the Fine Code Coverage Window

Current behavior

The styling of the window is black-text-on-white-background
Screenshot 2020-10-07 133455

Expected behavior

The window should have a dark background with light text (when the user selects a dark theme)

Visual Studio is reporting an exception with the extension

Installed product versions

  • Visual Studio: 2019 16.8.1
  • This extension: 1.1.10

Description

On loading Visual Studio a yellow bar appears beneath toolbar saying System.Collections.Generic.KeyNotFoundException

The activity log reports issues like:

<source>Editor or Editor Extension</source>
<description>System.Collections.Generic.KeyNotFoundException: key
   at Microsoft.VisualStudio.Utilities.PropertyCollection.GetProperty(Object key)
   at FineCodeCoverage.Impl.Tagger`1.Microsoft.VisualStudio.Text.Tagging.ITagger&lt;T&gt;.GetTags(NormalizedSnapshotSpanCollection spans) in C:\projects\finecodecoverage\FineCodeCoverage\Impl\Tagger.cs:line 39
   at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.&lt;GetTagsForBuffer&gt;d__47.MoveNext()
</description>

Steps to recreate

  1. Load Visual Studi

Current behavior

An exception is being thrown

Expected behavior

No exception

Side Notes

Attached below is a snippet of relevant parts of the activity log:
ActivityLog.zip

The process cannot access DLL files

I am currently unable to run the code coverage from Visual Studio. I currently receive the following error when it tries to run:

Fine Code Coverage : Synchronize Output Files To Work Folder (Test) Failed
System.IO.IOException: The process cannot access the file 'C:\Users\me\AppData\Local\FineCodeCoverage\[Hex folder name]\[Project name].dll' because it is being used by another process.

I attempted to exclude the first .dll that I got this error on, but this issue is happening with all of my .dll files.

All lines and branches are highlighted Red

Installed product versions

  • Visual Studio: 2019 Pro
  • This extension: 1.0.43

Description

After having run my tests every line and branch is highlighted as red (uncovered). Therefore, I am unsure how this extension is supposed to work.

Steps to recreate

  1. Load Project
  2. Run Tests

Current behavior

All lines and branches are highlighted red.

Expected behavior

I expect my tested branches and lines to be green and not red.

Cannot access DLL file / ArgumentNullException

Installed product versions

  • Visual Studio: 2019 Community
  • This extension: 1.1.11

Description

Crash calculating code coverage

Steps to recreate

I run all my tests on a private repository (can't provide code)

Current behavior

No results generated, got the following output with an error:

Fine Code Coverage : ================================== START ==================================

Fine Code Coverage : Ensure Work Folder Exists (Testing)

Fine Code Coverage : Synchronize Output Files To Work Folder (Testing)

Fine Code Coverage : Synchronize Output Files To Work Folder (Testing) Failed
System.IO.IOException: The process cannot access the file 'C:\Gits\studio\Testing\bin\x64\fine-code-coverage\Testing.dll' because it is being used by another process.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost)
   at System.IO.File.Copy(String sourceFileName, String destFileName, Boolean overwrite)
   at FineCodeCoverage.Engine.FileSynchronization.FileSynchronizationUtil.Synchronize(String sourceFolder, String destinationFolder) in C:\projects\finecodecoverage\FineCodeCoverage\Core\FileSynchronization\FileSynchronizationUtil.cs:line 21
   at FineCodeCoverage.Engine.FCCEngine.<>c.<ReloadCoverage>b__25_7(CoverageProject project) in C:\projects\finecodecoverage\FineCodeCoverage\Core\FCCEngine.cs:line 422
   at FineCodeCoverage.Engine.Model.CoverageProject.Step(String stepName, Action`1 action) in C:\projects\finecodecoverage\FineCodeCoverage\Core\Model\CoverageProject.cs:line 38

Fine Code Coverage : Error
System.ArgumentNullException: Value cannot be null.
Parameter name: path
   at System.IO.File.ReadAllText(String path)
   at FineCodeCoverage.Impl.TestContainerDiscoverer.<>c__DisplayClass21_0.<OperationState_StateChanged>b__0() in C:\projects\finecodecoverage\FineCodeCoverage\Impl\TestContainerDiscoverer.cs:line 163

Fine Code Coverage : ================================== ERROR ==================================

Sent beer on PayPal

Support for 64 bit projects

Installed product versions

  • Visual Studio: 2019 Professional
  • This extension: 1.1.10

Description

For now 64 bit projects are not supported.
I analyzed your code and I found this line:
OpenCoverUtil.RunOpenCover line 162
opencoverSettings.Add($@" -register:path32 ");

It would be nice to distinguish 32bit and 64bit.
To solve it you can add new property to local (project) options.

Do you want to add support for 64bit projects?

coverage report shows all zeroes and no lines covered

Installed product versions

  • Visual Studio: 2019 Community
  • This extension: 1.1.16

Description

The code coverage results show no lines covered at all

Steps to recreate

Run code coverage on my solution (several projects). Some Net Standard 2.1, Some NET 5, and one NET Framework 4.8.

Current behavior

Results show no lines covered in any project

Expected behavior

Show coverage

Side Notes

(private repo)

data:

Fine Code Coverage : ================================== START ==================================

Fine Code Coverage : Ensure Work Folder Exists (Testing)

Fine Code Coverage : Synchronize Output Files To Work Folder (Testing)

Fine Code Coverage : Run Coverage Tool (Testing)

Fine Code Coverage : Coverlet Run (Testing) Arguments 
"C:\Gits\studio\Testing\bin\x64\fine-code-coverage\Testing.dll"
--format "cobertura"
--exclude-by-file "**/Migrations/*"
--exclude-by-attribute "GeneratedCode"
--include-test-assembly
--target "dotnet"
--threshold-type line
--threshold-stat total
--threshold 0
--output "C:\Gits\studio\Testing\bin\x64\fine-code-coverage\_outputfolder\_cover.tool.xml"
--targetargs "test  ""C:\Gits\studio\Testing\bin\x64\fine-code-coverage\Testing.dll"" --nologo --blame --results-directory ""C:\Gits\studio\Testing\bin\x64\fine-code-coverage\_outputfolder"" --diag ""C:\Gits\studio\Testing\bin\x64\fine-code-coverage\_outputfolder/diagnostics.log""  "

Fine Code Coverage : Coverlet Run (Testing)
C:\Gits\studio\Testing\bin\x64\fine-code-coverage>"C:\Users\pablo\AppData\Local\FineCodeCoverage\coverlet\coverlet.exe" "C:\Gits\studio\Testing\bin\x64\fine-code-coverage\Testing.dll" --format "cobertura" --exclude-by-file "**/Migrations/*" --exclude-by-attribute "GeneratedCode" --include-test-assembly --target "dotnet" --threshold-type line --threshold-stat total --threshold 0 --output "C:\Gits\studio\Testing\bin\x64\fine-code-coverage\_outputfolder\_cover.tool.xml" --targetargs "test  ""C:\Gits\studio\Testing\bin\x64\fine-code-coverage\Testing.dll"" --nologo --blame --results-directory ""C:\Gits\studio\Testing\bin\x64\fine-code-coverage\_outputfolder"" --diag ""C:\Gits\studio\Testing\bin\x64\fine-code-coverage\_outputfolder/diagnostics.log""  "  1>"C:\Gits\studio\Testing\bin\x64\fine-code-coverage\coverlet-b920f5d4.bat.output"
Unable to instrument module: C:\Gits\studio\Testing\bin\x64\fine-code-coverage\Integrative.Lara.dll because : No symbol found for file: C:\Gits\studio\Testing\bin\x64\fine-code-coverage\Integrative.Lara.dll
Starting test execution, please wait...
Logging Vstest Diagnostics in file: C:\Gits\studio\Testing\bin\x64\fine-code-coverage\_outputfolder\diagnostics.log
A total of 1 test files matched the specified pattern.
C:\Gits\studio\Testing\bin\x64\fine-code-coverage>echo lala  1>myutiloutput.txt 
C:\Gits\studio\Testing\bin\x64\fine-code-coverage>echo lalala  1>null 
Data collector 'Blame' message: All tests finished running, Sequence file will not be generated.
Passed!  - Failed:     0, Passed:  1534, Skipped:     0, Total:  1534, Duration: 3 m 15 s - Testing.dll (net5.0)

Calculating coverage result...
  Generating report 'C:\Gits\studio\Testing\bin\x64\fine-code-coverage\_outputfolder\_cover.tool.xml'
+---------------------------------+------+--------+--------+
| Module                          | Line | Branch | Method |
+---------------------------------+------+--------+--------+
| Integrative.Adapters.PostgreSql | 0%   | 0%     | 0%     |
+---------------------------------+------+--------+--------+
| Integrative.Adapters.Sqlite     | 0%   | 0%     | 0%     |
+---------------------------------+------+--------+--------+
| Integrative.Adapters.SqlServer  | 0%   | 0%     | 0%     |
+---------------------------------+------+--------+--------+
| Integrative.CommonUI            | 0%   | 0%     | 0%     |
+---------------------------------+------+--------+--------+
| Integrative.DatabaseInterfaces  | 0%   | 0%     | 0%     |
+---------------------------------+------+--------+--------+
| Integrative.DatabaseManager     | 0%   | 0%     | 0%     |
+---------------------------------+------+--------+--------+
| Integrative.Execution           | 0%   | 0%     | 0%     |
+---------------------------------+------+--------+--------+
| Integrative.Extensibility       | 0%   | 0%     | 0%     |
+---------------------------------+------+--------+--------+
| Integrative.Hosting             | 0%   | 0%     | 0%     |
+---------------------------------+------+--------+--------+
| Integrative.MemoryDB            | 0%   | 0%     | 0%     |
+---------------------------------+------+--------+--------+
| Integrative.ModelerEngine       | 0%   | 0%     | 0%     |
+---------------------------------+------+--------+--------+
| Integrative.Platform            | 0%   | 0%     | 0%     |
+---------------------------------+------+--------+--------+
| Studio                          | 0%   | 0%     | 0%     |
+---------------------------------+------+--------+--------+
| Testing                         | 0%   | 0%     | 0%     |
+---------------------------------+------+--------+--------+

+---------+------+--------+--------+
|         | Line | Branch | Method |
+---------+------+--------+--------+
| Total   | 0%   | 0%     | 0%     |
+---------+------+--------+--------+
| Average | 0%   | 0%     | 0%     |
+---------+------+--------+--------+

Fine Code Coverage : ReportGenerator Run Arguments [reporttype:Cobertura] 
"-targetdir:C:\Gits\studio\Testing\bin\x64\fine-code-coverage\_outputfolder"
"-reports:C:\Gits\studio\Testing\bin\x64\fine-code-coverage\_outputfolder\_cover.tool.xml"
"-reporttypes:Cobertura"

Fine Code Coverage : ReportGenerator Run [reporttype:Cobertura]
C:\Gits\studio\Testing\bin\x64\fine-code-coverage\_outputfolder>"C:\Users\pablo\AppData\Local\FineCodeCoverage\reportGenerator\reportgenerator.exe" "-targetdir:C:\Gits\studio\Testing\bin\x64\fine-code-coverage\_outputfolder" "-reports:C:\Gits\studio\Testing\bin\x64\fine-code-coverage\_outputfolder\_cover.tool.xml" "-reporttypes:Cobertura"  1>"C:\Gits\studio\Testing\bin\x64\fine-code-coverage\_outputfolder\reportgenerator-b99a0d97.bat.output"
2020-11-20T21:11:11: Arguments
2020-11-20T21:11:11:  -targetdir:C:\Gits\studio\Testing\bin\x64\fine-code-coverage\_outputfolder
2020-11-20T21:11:11:  -reports:C:\Gits\studio\Testing\bin\x64\fine-code-coverage\_outputfolder\_cover.tool.xml
2020-11-20T21:11:11:  -reporttypes:Cobertura
2020-11-20T21:11:20: Writing report file 'C:\Gits\studio\Testing\bin\x64\fine-code-coverage\_outputfolder\Cobertura.xml'
2020-11-20T21:11:20: Report generation took 9.2 seconds

Fine Code Coverage : ReportGenerator Run Arguments [reporttype:HtmlInline_AzurePipelines] 
"-targetdir:C:\Gits\studio\Testing\bin\x64\fine-code-coverage\_outputfolder"
"-reports:C:\Gits\studio\Testing\bin\x64\fine-code-coverage\_outputfolder\cobertura.xml"
"-plugins:C:\USERS\PABLO\APPDATA\LOCAL\MICROSOFT\VISUALSTUDIO\16.0_393B4212\EXTENSIONS\MQEFK2VM.HSR\ReportGeneratorPlugins.dll"
"-reporttypes:FccDark"

Fine Code Coverage : ReportGenerator Run [reporttype:HtmlInline_AzurePipelines]
C:\Gits\studio\Testing\bin\x64\fine-code-coverage\_outputfolder>"C:\Users\pablo\AppData\Local\FineCodeCoverage\reportGenerator\reportgenerator.exe" "-targetdir:C:\Gits\studio\Testing\bin\x64\fine-code-coverage\_outputfolder" "-reports:C:\Gits\studio\Testing\bin\x64\fine-code-coverage\_outputfolder\cobertura.xml" "-plugins:C:\USERS\PABLO\APPDATA\LOCAL\MICROSOFT\VISUALSTUDIO\16.0_393B4212\EXTENSIONS\MQEFK2VM.HSR\ReportGeneratorPlugins.dll" "-reporttypes:FccDark"  1>"C:\Gits\studio\Testing\bin\x64\fine-code-coverage\_outputfolder\reportgenerator-0edd9ded.bat.output"
2020-11-20T21:11:20: Arguments
2020-11-20T21:11:20:  -targetdir:C:\Gits\studio\Testing\bin\x64\fine-code-coverage\_outputfolder
2020-11-20T21:11:20:  -reports:C:\Gits\studio\Testing\bin\x64\fine-code-coverage\_outputfolder\cobertura.xml
2020-11-20T21:11:20:  -plugins:C:\USERS\PABLO\APPDATA\LOCAL\MICROSOFT\VISUALSTUDIO\16.0_393B4212\EXTENSIONS\MQEFK2VM.HSR\ReportGeneratorPlugins.dll
2020-11-20T21:11:20:  -reporttypes:FccDark
2020-11-20T21:11:22: Writing report file 'C:\Gits\studio\Testing\bin\x64\fine-code-coverage\_outputfolder\index.html'
2020-11-20T21:11:22: Report generation took 1.6 seconds

Fine Code Coverage : ================================== DONE ===================================

Configure -register value

Installed product versions

  • Visual Studio: [example 2019 Professional]
  • This extension: [example 1.1.10]

Description

When running in a .netFramework project using OpenCover is always used -register:path32, but sometimes this profiler doesn't works and we got an error like:

No results, this could be for a number of reasons. The most common reasons are:
1) missing PDBs for the assemblies that match the filter please review the
output file and refer to the Usage guide (Usage.rtf) about filters.
2) the profiler may not be registered correctly, please refer to the Usage
guide and the -register switch.

Steps to recreate

  1. Create a project .netFramework
  2. Set test project with Platform Targe = x64
  3. Run the tests
  4. Opencover could not generate the report

Current behavior

The value to Opencover -register parameter is fixed in the code and when the target platform is not x86 or Any CPU the coverage is not reported

Expected behavior

We should be able to configure the -register parameter (including setting an empty value), as we can do to include or exclude files.

Side Notes

image

image

image

Issue generating Code Coverage report

Installed product versions

  • Visual Studio: 2019
  • This extension: 1.1.25

Description

Added coverlet.collector to test project and added Find Code Coverage VSIX to visual studio, is running fine in console but generating the report is not working.

Current behavior

Not generating the report, throwing exception in the output window in visual studio:

'""' is not recognized as an internal or external command, operable program or batch file.

Fine Code Coverage : ReportGenerator Run Arguments [reporttype:Cobertura] 
"-targetdir:D:\dev\HP.Enterprise.Client\HP.Enterprise.Client.Test\bin\Debug\fine-code-coverage\_outputfolder"
"-reports:D:\dev\HP.Enterprise.Client\HP.Enterprise.Client.Test\bin\Debug\fine-code-coverage\_outputfolder\_cover.tool.xml"
"-reporttypes:Cobertura"

Fine Code Coverage : Error
System.Exception: D:\dev\HP.Enterprise.Client\HP.Enterprise.Client.Test\bin\Debug\fine-code-coverage\_outputfolder>"" "-targetdir:D:\dev\HP.Enterprise.Client\HP.Enterprise.Client.Test\bin\Debug\fine-code-coverage\_outputfolder" "-reports:D:\dev\HP.Enterprise.Client\HP.Enterprise.Client.Test\bin\Debug\fine-code-coverage\_outputfolder\_cover.tool.xml" "-reporttypes:Cobertura"  1>"D:\dev\HP.Enterprise.Client\HP.Enterprise.Client.Test\bin\Debug\fine-code-coverage\_outputfolder\54a9a83e.bat.output" 

'""' is not recognized as an internal or external command, operable program or batch file.
   at FineCodeCoverage.Engine.ReportGenerator.ReportGeneratorUtil.<RunReportGenerator>g__run|22_1(String outputReportType, String inputReports, <>c__DisplayClass22_0& ) in C:\projects\finecodecoverage\FineCodeCoverage\Core\ReportGenerator\ReportGeneratorUtil.cs:line 215
   at FineCodeCoverage.Engine.ReportGenerator.ReportGeneratorUtil.RunReportGenerator(IEnumerable`1 coverOutputFiles, Boolean darkMode, String& unifiedHtmlFile, String& unifiedXmlFile, Boolean throwError) in C:\projects\finecodecoverage\FineCodeCoverage\Core\ReportGenerator\ReportGeneratorUtil.cs:line 226
   at FineCodeCoverage.Engine.FCCEngine.ReloadCoverage(IEnumerable`1 projects, Boolean darkMode) in C:\projects\finecodecoverage\FineCodeCoverage\Core\FCCEngine.cs:line 486
   at FineCodeCoverage.Impl.TestContainerDiscoverer.<>c__DisplayClass21_0.<OperationState_StateChanged>b__0() in C:\projects\finecodecoverage\FineCodeCoverage\Impl\TestContainerDiscoverer.cs:line 164

Expected behavior

Should generate the report and display in the Fine Code Coverage tab.

Works only when all tests are passing

Installed product versions

  • Visual Studio: 2019 community 16.7.6
  • This extension: 1.0.89
  • Windows 10 x64

Description

Extension throws an error and doesn't show anything when there are failing tests in project

Steps to recreate

  1. run tests on project with some tests failing

Current behavior

Extension throws an error when coverlet exits with exit code other than 0

Expected behavior

Should work with coverlet exit codes 1 and 2 too
https://github.com/coverlet-coverage/coverlet/blob/master/src/coverlet.console/ExitCodes.cs

Fine Code Coverage extension forcing all tests to run even when running a single test

Installed product versions

  • Visual Studio: 2019 Enterprise
  • This extension: 1.1.11
  • xunit 2.4.1
  • xunit runner 2.4.3
  • .dotnet core 3+

Description

With the extension enabled, trying to run a single test results in the test being run, and then all tests being run.

Steps to recreate

  1. Create any new dotnet core project
  2. add a dotnet core test library using xunit dotnetcore template
  3. create a Test1 and Test2 fact
  4. Set Test2 to Assert.IsTrue(false) to force a failure
  5. Run only Test1

Current behavior

1 test passed ... then 1 Failed and 1 Passed.

Expected behavior

1 test passed.

Side Notes

This is particularly troublesome for larger test libraries and integration tests in particular.
I spent some time troubleshooting xunit and then visual studio settings before I found this. Disabling things like "discover tests in realtime" (options > test > general) does not fix this.

Pics to help: Note I did not run the second test
image

And yet both ran

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.