Skip to content

Coverage being generated only with a filter argument #944

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

Closed
kblok opened this issue Sep 3, 2020 · 8 comments
Closed

Coverage being generated only with a filter argument #944

kblok opened this issue Sep 3, 2020 · 8 comments
Labels
waiting for customer Waiting for customer action

Comments

@kblok
Copy link

kblok commented Sep 3, 2020

I'm trying to setup coverage on playwright-sharp.
I added this to the csproj:

 <PackageReference Include="coverlet.msbuild" Version="2.8.0">
        <PrivateAssets>all</PrivateAssets>
        <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>

It seems to be working with these command arguments:

dotnet test ./PlaywrightSharp.Tests.csproj -f netcoreapp3.1 /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --filter ClassName~PlainTextContentEditableTests

But it doesn't work without the filter argument:

dotnet test ./PlaywrightSharp.Tests.csproj -f netcoreapp3.1 /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura

Note: The full test suite is over 1,000 tests that could take over 5 minutes.

Ideas?

@MarcoRossignoli
Copy link
Collaborator

MarcoRossignoli commented Sep 4, 2020

But it doesn't work without the filter argument:

What does mean "doesn't work"?Are the process hanging?It's slow?Can you try to run in local?Instrumentation is invasive and sometimes slow down a lot tests, we have some issue related to this for instance #777

@MarcoRossignoli MarcoRossignoli added the waiting for customer Waiting for customer action label Sep 4, 2020
@kblok
Copy link
Author

kblok commented Sep 4, 2020

With the filter argument, I'm getting the Calculating coverage result..., Generating report and the tiny report and the end, and the file is being generated.
Without that argument, I'm getting none of that.

These are the outputs with /clp:PerformanceSummary
out-with-filter.txt
out-with-no-filter.txt

@MarcoRossignoli
Copy link
Collaborator

Can you enable logging and attach result(be sure to not expose sensible data)? https://github.com/coverlet-coverage/coverlet/blob/master/Documentation/Troubleshooting.md#msbuild-integration

@kblok
Copy link
Author

kblok commented Sep 4, 2020

I can't do that on macOS, right?

@MarcoRossignoli
Copy link
Collaborator

dotnet test command should work also on macOS, I don't know if msbuildlog is cross plat.

@MarcoRossignoli
Copy link
Collaborator

MarcoRossignoli commented Sep 5, 2020

@MarcoRossignoli
Copy link
Collaborator

Closed for stale conversation, feel free to re-open if needed.

@kblok
Copy link
Author

kblok commented Jan 3, 2021

Sorry for the lack of feedback @MarcoRossignoli. I'll leave this in my To-Do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for customer Waiting for customer action
Projects
None yet
Development

No branches or pull requests

2 participants