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

[BUG] Threshold includes also not included projects #1552

Open
Mateusz19021996 opened this issue Nov 13, 2023 · 2 comments
Open

[BUG] Threshold includes also not included projects #1552

Mateusz19021996 opened this issue Nov 13, 2023 · 2 comments
Labels
question This issue is a question stale waiting for customer Waiting for customer action

Comments

@Mateusz19021996
Copy link

Describe the bug
In my project I run below command to run test execution with coverage and threshold. I found problem. When I execute my command , while execution in logs I can see that error occures also in projects which are not included. For example :

This is simple structure:
my-project.sln
tests
---> services.unitTests.csproj
---> domain.unitTests.csproj
---> repository.unitTests.csproj
src
---> services.csproj
---> domain.csproj
---> repository.csproj

I run :

dotnet test /p:CollectCoverage=true /p: CoverletOutput:"../Results/Coverage/" /p:MergeWith: "../Results/Coverage/" /p:CoverletOutputFormat:"json,cobertura,opencover" /p:Threshold:80 /p:Include:"[services.csproj]*,[domain.csproj]*"

Expected behavior

Actual behavior
Actually final ASCII table with results looks fine, but while execution I can see that table is generated multiple times, and under all there are errors which says that : The total line coverage is below the specified 80 [path to not included project <repository.unitTests.csproj>]

Additional context
I don't undestand this behavior's. For first why we check test coverage of test project?.. and secondly I'm trying to handle this exception by regex.. so I cannot have excpetion from not included project.. Any suggestions how to handle it?

@github-actions github-actions bot added the untriaged To be investigated label Nov 13, 2023
@Bertk
Copy link
Collaborator

Bertk commented Dec 4, 2023

Hi, please double check the include parameter. This does not support file names see documentation.

@Bertk Bertk added question This issue is a question and removed untriaged To be investigated labels Dec 4, 2023
@Bertk Bertk added the waiting for customer Waiting for customer action label Jan 13, 2024
Copy link

This issue is stale because it has been open for 3 months with no activity.

@github-actions github-actions bot added the stale label Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question This issue is a question stale waiting for customer Waiting for customer action
Projects
None yet
Development

No branches or pull requests

2 participants