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

Increase code coverage to 90% (resolves #42) #49

Merged
merged 7 commits into from
Feb 14, 2023
Merged

Conversation

emdobrin
Copy link
Contributor

@emdobrin emdobrin commented Feb 11, 2023

Description

  • Adds new tests to increase code coverage to 90%
  • Added few helper functions for test body size reduction
  • Removes internal usages of VisitorID objects and VisitorIDSerializer, uses DataReader and base types, and adds more tests on serializing custom visitor ids

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@codecov
Copy link

codecov bot commented Feb 11, 2023

Codecov Report

Merging #49 (e3e5010) into dev-v2.0.1 (655ee79) will increase coverage by 8.10%.
The diff coverage is 100.00%.

@@               Coverage Diff                @@
##             dev-v2.0.1      #49      +/-   ##
================================================
+ Coverage         82.02%   90.13%   +8.10%     
- Complexity          293      323      +30     
================================================
  Files                15       15              
  Lines              1541     1520      -21     
  Branches            180      180              
================================================
+ Hits               1264     1370     +106     
+ Misses              184       81     -103     
+ Partials             93       69      -24     
Flag Coverage Δ
unit-functional-tests 90.13% <100.00%> (+8.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ng/mobile/analytics/internal/AnalyticsConstants.kt 100.00% <ø> (ø)
...ng/mobile/analytics/internal/AnalyticsExtension.kt 89.96% <ø> (+12.80%) ⬆️
...e/analytics/internal/AnalyticsRequestSerializer.kt 92.30% <100.00%> (+7.01%) ⬆️
...keting/mobile/analytics/internal/AnalyticsState.kt 92.70% <100.00%> (+22.52%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@emdobrin emdobrin changed the title Use helper functions, add more tests for AnalyticsExtension Increase code coverage to 90% Feb 13, 2023
@emdobrin emdobrin marked this pull request as ready for review February 13, 2023 21:19
@emdobrin emdobrin linked an issue Feb 13, 2023 that may be closed by this pull request
@emdobrin emdobrin changed the title Increase code coverage to 90% Increase code coverage to 90% (resolves #42) Feb 13, 2023
@emdobrin emdobrin merged commit 3625510 into adobe:dev-v2.0.1 Feb 14, 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.

unit tests for AnalyticsExtension
2 participants