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

Testing implementation for supporting advertising identifier #56

Merged

Conversation

timkimadobe
Copy link
Contributor

Description

Updating test cases to cover ad ID related feature updates.
IdentityState: with consent event dispatch, without consent event dispatch, no update to ad ID
IdentityProperties: get/set ad ID tests

Add tests for ad ID getter and setter
Add tests for event utils ad ID helpers
Add tests for ad ID event flow (e2e)
Rename ad ID event utils methods to match naming conventions
# Conflicts:
#	code/edgeidentity/src/main/java/com/adobe/marketing/mobile/edge/identity/EventUtils.java
#	code/edgeidentity/src/test/java/com/adobe/marketing/mobile/edge/identity/IdentityExtensionTests.java
# Conflicts:
#	code/edgeidentity/src/main/java/com/adobe/marketing/mobile/edge/identity/IdentityState.java
@codecov
Copy link

codecov bot commented Mar 18, 2022

Codecov Report

Merging #56 (e017ad4) into feature/adIdConsent (3b43391) will increase coverage by 26.51%.
The diff coverage is 91.84%.

@@                   Coverage Diff                    @@
##           feature/adIdConsent      #56       +/-   ##
========================================================
+ Coverage                54.51%   81.02%   +26.51%     
========================================================
  Files                       19       19               
  Lines                      910      922       +12     
  Branches                   138      140        +2     
========================================================
+ Hits                       496      747      +251     
+ Misses                     322      123      -199     
+ Partials                    92       52       -40     
Flag Coverage Δ
functional-tests 61.17% <81.63%> (+6.67%) ⬆️
unit-tests 79.06% <89.80%> (?)

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

Impacted Files Coverage Δ
.../edge/identity/ListenerIdentityRequestContent.java 94.12% <ø> (+82.35%) ⬆️
.../marketing/mobile/edge/identity/IdentityState.java 89.32% <85.71%> (+37.36%) ⬆️
...obe/marketing/mobile/edge/identity/EventUtils.java 67.44% <100.00%> (+29.94%) ⬆️
...keting/mobile/edge/identity/IdentityExtension.java 74.31% <100.00%> (+11.55%) ⬆️
...eting/mobile/edge/identity/IdentityProperties.java 89.87% <100.00%> (+29.06%) ⬆️
...keting/mobile/edge/identity/IdentityConstants.java 0.00% <0.00%> (ø)
...e/marketing/mobile/edge/identity/IdentityItem.java 60.87% <0.00%> (+13.04%) ⬆️
... and 13 more

Update IdentityStateTest case to test for null ad ID on IdentityState initialization
Update log formatting
…ID value in props

Update test names to match naming convention
…in ad ID event data

Update test file formatting for EventUtilsTests
Update EventUtils method locations to be grouped by method function and ordered by method name
Copy link
Contributor Author

@timkimadobe timkimadobe left a comment

Choose a reason for hiding this comment

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

Updated test classes based on feedback; all zeros -> all zeros case still needs some review

@emdobrin
Copy link
Contributor

The changes look good, and let's add a few additional functional tests for integration testing with MobileCore.

tests calling mobile core API to set advertising identifier and verifies:
- event dispatch
- value in persistence
- value in XDM shared state
Remove test case for impossible initial state of all zeros ad ID
Update functional test with javadocs, cleaned up test case comments and descriptions
Copy link
Contributor

@emdobrin emdobrin left a comment

Choose a reason for hiding this comment

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

Looks good to me, left a small comment about a duplicated test.

@timkimadobe timkimadobe merged commit 8f79711 into adobe:feature/adIdConsent Apr 12, 2022
@timkimadobe timkimadobe deleted the feature-ad-id-testing branch January 18, 2023 23:26
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.

3 participants