-
Notifications
You must be signed in to change notification settings - Fork 1
PP-1700: Unit and Integration related to feature flag #837
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
base: main
Are you sure you want to change the base?
Conversation
… Journey feature flag PP-1700
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive testing for the user analytics feature flag functionality, specifically testing how BufferedUserAnalyticsEventTracker
behaves when the user journey analytics is enabled or disabled.
- Unit tests for
BufferedUserAnalyticsEventTracker
to verify tracker initialization based on feature flag state - Integration tests using
GiniCaptureFragment
to test the analytics behavior in a realistic scenario - Helper class to facilitate testing with mocked
GiniCapture
instances
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
BufferedUserAnalyticsEventTrackerTest.kt | Comprehensive unit tests for analytics tracker behavior with feature flag |
BufferedUserAnalyticsEventTracker.kt | Adds test-only method to expose internal trackers for verification |
GiniCaptureFragmentTest.kt | Integration tests verifying analytics behavior through fragment lifecycle |
GiniCaptureHelperForInstrumentationTests.java | Test helper to inject mocked GiniCapture instances |
build.gradle.kts | Adds mockito-kotlin2 dependency for testing |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
...sdk/sdk/src/androidTest/java/net/gini/android/capture/ginicapture/GiniCaptureFragmentTest.kt
Show resolved
Hide resolved
...sdk/src/test/java/net/gini/android/capture/tracking/BufferedUserAnalyticsEventTrackerTest.kt
Outdated
Show resolved
Hide resolved
...sdk/src/test/java/net/gini/android/capture/tracking/BufferedUserAnalyticsEventTrackerTest.kt
Outdated
Show resolved
Hide resolved
...sdk/src/test/java/net/gini/android/capture/tracking/BufferedUserAnalyticsEventTrackerTest.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, it looks very good. I have three suggestions that we can discuss in our Android sync. Thanks Obaid.
...sdk/sdk/src/androidTest/java/net/gini/android/capture/ginicapture/GiniCaptureFragmentTest.kt
Show resolved
Hide resolved
...sdk/src/test/java/net/gini/android/capture/tracking/BufferedUserAnalyticsEventTrackerTest.kt
Show resolved
Hide resolved
...sdk/src/test/java/net/gini/android/capture/tracking/BufferedUserAnalyticsEventTrackerTest.kt
Outdated
Show resolved
Hide resolved
…to PP-1700-unit-and-integration-tests
…r to return boolean for better testing PP-1700
…entTracker to return boolean for better testing PP-1700
…ntTracker to return boolean for better testing PP-1700
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thank you 🥇
… definition of method. PP-1700
|
Description
BufferedUserAnalyticsEventTracker
BufferedUserAnalyticsEventTracker
GiniCaptureFragment
NetworkRequestsManager
ImageMultiPageDocumentMemoryStore
GiniCapture
Some of the above mentioned classes are used for mocks only.
Notes for reviewer
Analytics for android uses multiple classes, please read the comments mentioned in
GiniCaptureFragmentTest
and specially inBufferedUserAnalyticsEventTrackerTest
. These comments explain how our analytics are working, and how we can test the behaviors.