Output pane shows no results
Using mstest in Visual Studio 2022 Community.
I frequently have to run the test run twice in order to see results in the output pane. There's no rhyme or reason that I can tell, and when the output pane shows no results, the code coverage output shows up in the output directory - all of the html files are good and the Cobertura report looks complete.
I'm including the .runsettings file, but I can't see how settings would have anything to do with it not working one time and working the next.
<?xml version="1.0" encoding="utf-8"?>
<RunSettings>
<RunConfiguration>
<ResultsDirectory>C:\Users\mbenn\source\repos\sqlitemin\UnitTests\bin\Debug\fine-code-coverage\coverage-tool-output</ResultsDirectory>
<TestAdaptersPaths>C:\Users\mbenn\AppData\Local\FineCodeCoverage\msCodeCoverage\17.13.0\build\netstandard2.0</TestAdaptersPaths>
<CollectSourceInformation>False</CollectSourceInformation>
<DisableAppDomain>True</DisableAppDomain>
</RunConfiguration>
<DataCollectionRunSettings>
<DataCollectors>
<DataCollector friendlyName="Code Coverage" enabled="True">
<Configuration>
<CodeCoverage>
<ModulePaths>
<Exclude>
<ModulePath>C:\\Users\\mbenn\\source\\repos\\sqlitemin\\UnitTests\\bin\\Debug\\UnitTests.dll</ModulePath>
</Exclude>
<Include>
<ModulePath>.*\\sqlitemin\.dll$</ModulePath>
</Include>
</ModulePaths>
<Functions>
<Exclude></Exclude>
<Include></Include>
</Functions>
<Attributes>
<Exclude></Exclude>
<Include></Include>
</Attributes>
<Sources>
<Exclude></Exclude>
<Include></Include>
</Sources>
<CompanyNames>
<Exclude></Exclude>
<Include></Include>
</CompanyNames>
<PublicKeyTokens>
<Exclude></Exclude>
<Include></Include>
</PublicKeyTokens>
<UseVerifiableInstrumentation>True</UseVerifiableInstrumentation>
<AllowLowIntegrityProcesses>True</AllowLowIntegrityProcesses>
<CollectFromChildProcesses>True</CollectFromChildProcesses>
<CollectAspDotNet>False</CollectAspDotNet>
</CodeCoverage>
<Format>Cobertura</Format>
<FCCGenerated />
</Configuration>
</DataCollector>
</DataCollectors>
</DataCollectionRunSettings>
</RunSettings>
I think that the FCC report tool window needs to have been activated to capture the results
Also note that running another test whilst FCC is collecting will cancel a collection in progress.
What you may be experiencing is a setting that does not show coverage based upon the results. For instance there is one that hides fully covered code. Although that would not explain no coverage followed by coverage - if you have selected the exact same set of tests.
When you experience missing coverage results please check the FCC output window pane.
The FineCodeCoverage window doesn't have to be open to get a coverage report. What happens is that I run the tests, open the window, and it looks like does when you hit the "FCC Clear UI" menu option, except that there is also nothing in the coverage log. (No, I'm not hitting that menu option accidentally :)
When it works right, I run the tests, open the FCC window and see the results.
What options have you set in Visual Studio ?
I think I got them all; there should be a way to export these to a text file.
there should be a way to export these to a text file.
There is.
The FineCodeCoverage window doesn't have to be open to get a coverage report.
It may be necessary for it to have been activated once during the visual studio session for the report to be shown.
No, it does it sometimes after I've had the output open several times. As I say, I can't find any rhyme or reason for when it does it. I did notice that when I have to re-run the tests to get results, the sort column that I had previously selected goes back to default.
Can you provide a minimal repro so I can debug against and also provide the version of visual studio and fcc you are using.
Is the report index.html generated when there is no report shown ?
Microsoft Visual Studio Community 2022 (64-bit) Version 17.14.3
Fine Code coverage Version 1.1.245
As I said, the coverage output is present in the unit test debug directory when it does this, and appears to be up-to-date.
I can't produce a minimal repro because, as I said again, so far I haven't been able to predict when it will do it.
Without a solution that we know has this behaviour there isn't anything I can do.
Is your solution open source ?
The next time it occurs please post the FCC Output Window Pane logs. The log from the test explorer can also be useful.
Note that there is an issue where classes with just async methods are not included.
Perhaps you could give some information on what you are testing. Also are you using the newer Microsoft.Testing.Platform ?
No, the solution is not open source. I'm using mstest by way of the NuGet packages:
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.ApplicationInsights" version="2.23.0" targetFramework="net48" />
<package id="Microsoft.Bcl.AsyncInterfaces" version="9.0.7" targetFramework="net48" />
<package id="Microsoft.DiaSymReader" version="2.0.0" targetFramework="net48" />
<package id="Microsoft.Extensions.DependencyModel" version="9.0.7" targetFramework="net48" />
<package id="Microsoft.Testing.Extensions.CodeCoverage" version="17.14.2" targetFramework="net48" />
<package id="Microsoft.Testing.Extensions.Telemetry" version="1.8.0" targetFramework="net48" />
<package id="Microsoft.Testing.Extensions.TrxReport.Abstractions" version="1.8.0" targetFramework="net48" />
<package id="Microsoft.Testing.Extensions.VSTestBridge" version="1.8.0" targetFramework="net48" />
<package id="Microsoft.Testing.Platform" version="1.8.0" targetFramework="net48" />
<package id="Microsoft.Testing.Platform.MSBuild" version="1.8.0" targetFramework="net48" />
<package id="Microsoft.TestPlatform.AdapterUtilities" version="17.14.1" targetFramework="net48" />
<package id="Microsoft.TestPlatform.ObjectModel" version="17.14.1" targetFramework="net48" />
<package id="MSTest.Analyzers" version="3.10.0" targetFramework="net48" developmentDependency="true" />
<package id="MSTest.TestAdapter" version="3.10.0" targetFramework="net48" />
<package id="MSTest.TestFramework" version="3.10.0" targetFramework="net48" />
<package id="System.Buffers" version="4.6.1" targetFramework="net48" />
<package id="System.Collections.Immutable" version="9.0.7" targetFramework="net48" />
<package id="System.Diagnostics.DiagnosticSource" version="9.0.7" targetFramework="net48" />
<package id="System.IO.Pipelines" version="9.0.7" targetFramework="net48" />
<package id="System.Memory" version="4.6.3" targetFramework="net48" />
<package id="System.Numerics.Vectors" version="4.6.1" targetFramework="net48" />
<package id="System.Reflection.Metadata" version="9.0.7" targetFramework="net48" />
<package id="System.Runtime.CompilerServices.Unsafe" version="6.1.2" targetFramework="net48" />
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net48" />
<package id="System.Text.Encodings.Web" version="9.0.7" targetFramework="net48" />
<package id="System.Text.Json" version="9.0.7" targetFramework="net48" />
<package id="System.Threading.Tasks.Extensions" version="4.6.3" targetFramework="net48" />
<package id="System.ValueTuple" version="4.6.1" targetFramework="net48" />
</packages>
As I say, when it does it, the output pane shows no information. The logs tab doesn't have anything in it. I will try to capture the test logs when it does it again.
For the newer Microsoft.Testing.Platform FCC had to 'trick' test explorer to produce coverage results the old way. Perhaps with your version of visual studio this is not working the same as before.
I will revisit how FCC works with the testing platform as they have changed their code recently as per my request.
If you could provide a simple solution with the same nuget test setup, a single test of a single method in another project I will investigate in a few days.
If you encounter no coverage then hopefully the test logs will shed some light.
same case here, the output pane shows nothing in VS Studio Community 2022 17.14.9 FCC 1.1.245
Same here in Microsoft Visual Studio Professional 2022 (64-bit) Version 17.14.13 (August 2025)
I sometimes have this in VS 2022 Professional 17.14.16. When it happens (not sure if it is related) the green icon in the test explorer is not solid greed but only the lines are green.