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

.runsettings Data Collector not being applied in CLI #34479

Closed
Creastoff opened this issue Mar 9, 2023 · 5 comments · Fixed by #35086
Closed

.runsettings Data Collector not being applied in CLI #34479

Creastoff opened this issue Mar 9, 2023 · 5 comments · Fixed by #35086
Assignees
Labels
cli/subsvc dotnet-fundamentals/svc Pri3 support-request Support-style question;customer needs help solving a problem [org][type][category]

Comments

@Creastoff
Copy link

Creastoff commented Mar 9, 2023

When you run dotnet test .\XUnitTest.sln -s .\XUnitTest\.runsettings against this example solution and import the code coverage results into Visual Studio 2022 Enterprise you can see references to unwanted binaries, i.e. Moq.dll. When you use the same .runsettings via Visual Studio's "Analyze Code Coverage" functionality you can only see references to the binaries generated by the build.


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

@dotnet-bot dotnet-bot added the ⌚ Not Triaged Not triaged label Mar 9, 2023
@gewarren gewarren added the support-request Support-style question;customer needs help solving a problem [org][type][category] label Mar 28, 2023
@tdykstra
Copy link
Contributor

@nohwnd Can you help with this?

@Creastoff
Copy link
Author

Creastoff commented Apr 16, 2023

@tdykstra @nohwnd Has this slipped the net due the the "not triaged" label being removed?

@nohwnd
Copy link
Member

nohwnd commented Apr 20, 2023

@jakubch1 please help :)

@jakubch1
Copy link
Member

Currently you have to create runsettings and exclude libraries (https://learn.microsoft.com/en-us/visualstudio/test/customizing-code-coverage-analysis?view=vs-2022)
In VS it is done automatically as we know all projects in the solution. In command line we don't have this knowledge.
We will work on simplifying this: microsoft/codecoverage#12

@jakubch1
Copy link
Member

Please change runsettings exclusions to:

								<ModulePath>.*xunit.execution.dotnet.dll$</ModulePath>
								<ModulePath>.*xunit.runner.visualstudio.dotnetcore.testadapter.dll$</ModulePath>
								<ModulePath>.*xunit.runner.utility.netcoreapp10.dll$</ModulePath>
								<ModulePath>.*xunit.assert.dll$</ModulePath>
								<ModulePath>.*unittests.dll$</ModulePath>
								<ModulePath>.*xunit.core.dll$</ModulePath>
								<ModulePath>.*humanizer.dll$</ModulePath>
								<ModulePath>.*xunit.runner.reporters.netcoreapp10.dll$</ModulePath>
								<ModulePath>.*moq.dll$</ModulePath>

@tdykstra tdykstra self-assigned this Apr 20, 2023
@ghost ghost added the in-pr This issue will be closed (fixed) by an active pull request. label Apr 20, 2023
@ghost ghost removed the in-pr This issue will be closed (fixed) by an active pull request. label Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli/subsvc dotnet-fundamentals/svc Pri3 support-request Support-style question;customer needs help solving a problem [org][type][category]
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

6 participants