Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed code coverage compatibility issue #2514

Merged
3 commits merged into from
Aug 10, 2020

Conversation

cvpoienaru
Copy link
Member

Description

Fixed code coverage compatibility issue

@@ -112,8 +112,7 @@ public string GetSessionName()

try
{
var processor = new CodeCoverageRunSettingsProcessor(defaultConfigurationElement);
configurationElement = (XmlElement)processor.Process(configurationElement);
configurationElement = this.RunSettingsProcessor(configurationElement, defaultConfigurationElement);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets have method AddDefaultExclusions

with content:
var processor = new CodeCoverageRunSettingsProcessor(defaultConfigurationElement);
configurationElement = (XmlElement)processor.Process(configurationElement);

Could you please add comment to this function with explanation why we are adding it.

I want to make sure that nobody will remove it :)

@ghost
Copy link

ghost commented Aug 10, 2020

Hello @cvpoienaru!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit 3954834 into microsoft:master Aug 10, 2020
cvpoienaru added a commit that referenced this pull request Aug 19, 2020
* Fixed code coverage compatibility issue

* Added comment

* Updated commit
@robertleelarson
Copy link

robertleelarson commented Aug 26, 2020

I believe this regression has shown up again with the push of either this PR Or the one Prior (16.7.0)
#2287

We create a win 64 build of our dotnet core 3.1 project.
We were using 16.6.1 after the reported issues of not fixed through 16.5.0

Azure Dev Ops agents are reporting 16.7.0 is installed.

Test run for D:\a\1\s\PROJECTFOLDER\bin\Release\netcoreapp3.1\win-x64\PROJECT.Api.Tests.dll(.NETCoreApp,Version=v3.1) Microsoft (R) Test Execution Command Line Tool Version 16.7.0

Reverting back to 16.2.0 via nuget is allowing the tests to be run again while 16.7.0 is identifying itself as the CLI tool.

Behavior started today 8/26/2020 using ADO requested image of windows-latest.
Last week the CLI Tool was 16.6.0 with no issues.

"C:\Program Files\dotnet\dotnet.exe" test D:\a\1\s\PROJECT\PROJECTcsproj --configuration Release --logger trx --no-build --no-restore --runtime win-x64 "--collect:XPlat Code Coverage" --results-directory:D:\a\1\s\DotNetTestResults --settings:D:\a\1\s\DevOps\Pipelines\custom_files\PROJECTDotNet.runsettings

Run Settings contents File:
<?xml version="1.0" encoding="utf-8"?> <RunSettings> <RunConfiguration> <MaxCpuCount>0</MaxCpuCount> </RunConfiguration> </RunSettings>

Error coming in using 16.6.1, 16.7.0, and 16.7.1 Nuget packages with the ADO 16.7.0 Test Command line tool
`
Starting test execution, please wait...

A total of 1 test files matched the specified pattern.
Testhost process exited with error: It was not possible to find any compatible framework version
The specified framework 'Microsoft.AspNetCore.App', version '3.1.0' was not found.

  • Check application dependencies and target a framework version installed at:
    D:\a\1\s\PROJECT.Api.Tests\bin\Release\netcoreapp3.1\win-x64\
  • Installing .NET Core prerequisites might help resolve this problem:
    https://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
  • The .NET Core framework and SDK can be installed from:
    https://aka.ms/dotnet-download
    . Please check the diagnostic logs for more information.
    Results File: D:\a\1\s\DotNetTestResults\VssAdministrator_fv-az686_2020-08-26_19_40_57.trx`

@nohwnd
Copy link
Member

nohwnd commented Aug 27, 2020

@cvpoienaru please have a look.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants