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

chore: add code coverage #432

Merged
merged 34 commits into from
Apr 5, 2023

Conversation

stijnmoreels
Copy link
Member

Add code coverage reporting.

Relates to arcus-azure/arcus#264

@stijnmoreels stijnmoreels added this to the v2.0 milestone Jan 20, 2023
@netlify
Copy link

netlify bot commented Jan 20, 2023

Deploy Preview for arcus-webapi canceled.

Name Link
🔨 Latest commit d68191a
🔍 Latest deploy log https://app.netlify.com/sites/arcus-webapi/deploys/642d3020d0a3030008f02f53

@codecov
Copy link

codecov bot commented Jan 20, 2023

Codecov Report

❗ No coverage uploaded for pull request base (main@ff70703). Click here to learn what that means.
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #432   +/-   ##
=======================================
  Coverage        ?   83.09%           
=======================================
  Files           ?       49           
  Lines           ?     1686           
  Branches        ?      152           
=======================================
  Hits            ?     1401           
  Misses          ?      223           
  Partials        ?       62           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@stijnmoreels stijnmoreels changed the title chore: add code coverage chore: add code coverage (🚧🏗👷‍♂️) Jan 20, 2023
@stijnmoreels
Copy link
Member Author

Added [ExcludeFromCodeCoverage] to components that are tested via integration tests (and are also best suited to test as an integration test), for the missing parts are new unit tests added.

@stijnmoreels stijnmoreels changed the title chore: add code coverage (🚧🏗👷‍♂️) chore: add code coverage Jan 20, 2023
@fgheysels
Copy link
Member

fgheysels commented Jan 20, 2023

Added [ExcludeFromCodeCoverage] to components that are tested via integration tests (and are also best suited to test as an integration test), for the missing parts are new unit tests added.

I think we should not do that (apply that attribute).
You could make sure that coverage is also reported for the integration tests. (But those tests are not ran by the CI pipeline i presume)

@stijnmoreels
Copy link
Member Author

You could make sure that coverage is also reported for the integration tests. (But those tests are not ran by the CI pipeline i presume)

We do run the integration tests in the CI pipeline for every Arcus repo, but running multiple test projects with does not work (as far as I know) to combine in a single code coverage result.

@fgheysels
Copy link
Member

You could make sure that coverage is also reported for the integration tests. (But those tests are not ran by the CI pipeline i presume)

We do run the integration tests in the CI pipeline for every Arcus repo, but running multiple test projects with does not work (as far as I know) to combine in a single code coverage result.

I 've done this before in an Azure DevOps pipeline. Do do that, I had to combine the reports generated by the separate test-runs and use a separate task to combine & publish them.

@stijnmoreels
Copy link
Member Author

You could make sure that coverage is also reported for the integration tests. (But those tests are not ran by the CI pipeline i presume)

We do run the integration tests in the CI pipeline for every Arcus repo, but running multiple test projects with does not work (as far as I know) to combine in a single code coverage result.

I 've done this before in an Azure DevOps pipeline. Do do that, I had to combine the reports generated by the separate test-runs and use a separate task to combine & publish them.

Aha, okay, maybe that will be good here as the integration tests are actually all 'in-memory'/self-contained ones and do not require external resources.

@stijnmoreels stijnmoreels changed the title chore: add code coverage chore: add code coverage (🚧🏗👷‍♂️) Jan 23, 2023
@stijnmoreels
Copy link
Member Author

@fgheysels , did you have any idea how to add a threshold while combining 2 test reports? A threshold on any of the test runs does not take into account the combined results. That's a problem here as they are together above 80%, but not separate.

@stijnmoreels
Copy link
Member Author

stijnmoreels commented Jan 25, 2023

This is kind of a real missing feature in Coverlet, to have a total threshold guard for merged code coverage reports.
@fgheysels , any experience on this? Together, they are more than 90% coverage, but not separately.
Will have to change it to JSON, probably, before it can be merged.

@stijnmoreels stijnmoreels changed the title chore: add code coverage (🚧🏗👷‍♂️) chore: add code coverage Apr 5, 2023
@fgheysels fgheysels merged commit 34deb46 into arcus-azure:main Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants