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

[LD-147] Add merged code coverage. #201

Merged
merged 18 commits into from
Jan 30, 2024
Merged

Conversation

nowakweronika
Copy link
Collaborator

@nowakweronika nowakweronika commented Jan 25, 2024

Pull-Request

Description

Why?

We want to have merged coverage report for both - Unit Test and E2E tests.

What?

Added merged coverage report.

Links to related issues

Demo

Coverage report Screenshot 2024-01-30 at 13 56 06

How to test

You can delete some tests and check the coverage.
or

  1. You can build the app locally.
  2. Execute ./gradlew testDebugUnitTest
  3. Execute ./gradlew codeCoverage
  4. Open the index.html report from build/reports/jacoco/codeCoverage/html locally
  5. Download the code-coverage artifact from GitHub CI and open index.html report from coverage-report/html
  6. Compare them - The first contains report from only Unit Tests and the second from both. They should be different.

Documentation

Checklist

- [ ] Functionality is covered by unit tests
- [ ] Functionality is covered by integration tests

  • I've updated PR description with relevant information
  • I've done self code review
  • I've manually tested if the code and app works

Copy link

Unit tests code coverage

Overall Project 84.16% 🍏

There is no coverage information present for the Files changed

Copy link

E2E code coverage

Overall Project 67.06%

There is no coverage information present for the Files changed

Copy link

Merged code coverage

Overall Project NaN% NaN% 🍏

There is no coverage information present for the Files changed

@nowakweronika nowakweronika changed the base branch from feature/code_coverage_for_end2end to develop January 26, 2024 10:57
Copy link

Overall Project 83.55% 🍏

There is no coverage information present for the Files changed

@nowakweronika nowakweronika changed the title Add merged code coverage. [LD-147] Add merged code coverage. Jan 30, 2024
Copy link

Overall Project 83.55% 🍏

There is no coverage information present for the Files changed

@nowakweronika nowakweronika marked this pull request as ready for review January 30, 2024 13:39
Copy link
Member

@jacek-marchwicki jacek-marchwicki left a comment

Choose a reason for hiding this comment

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

lgtm

.github/workflows/run-test.yml Outdated Show resolved Hide resolved
Comment on lines -160 to -171
'**/R.class',
'**/R$*.class',
'**/BuildConfig.*',
"**/*Application.*",
'**/Manifest*.*',
'**/*Test*.*',
'**/android/**/*.*',
'**/androidx/**/*.*',
'**/airbnb/**/*.*',
"**/di/**/*.*",
'**/*Dagger*.*',
"**/*Screen*"
Copy link
Member

Choose a reason for hiding this comment

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

out-of-scope: We should probably adjust now, those exclude. I.e.

  • "**/*Application.*", shuldn't be excluded, because we test application
  • "**/di/**/*.*" shuldn't be excluded, because we test it
  • `"**/Screen" shuldn't be excluded, because we test it
  • '**/*Dagger*.*', - we don't use dagger ;)
  • '**/android/**/*.*, **/androidx/**/*.* and '**/*Test*.*' are excluded, but doesn't make sense, because those files aren't included in "**/tmp/kotlin-classes/debug/**"

But: ShowkaseRoot, ShowkaseRootCodegen and ShowkaseRootShowkaseExcetionsFunctionsCodegenKt could be excluded from the report,

out-of-scope: In the report, files from the components module (com.appunite.loudius.components.components) aren't included.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Task added!

Copy link

Overall Project 83.55% 🍏

There is no coverage information present for the Files changed

@nowakweronika nowakweronika merged commit 82ddaf3 into develop Jan 30, 2024
9 checks passed
@nowakweronika nowakweronika deleted the feature/merge_coverage branch February 9, 2024 11:14
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