-
Notifications
You must be signed in to change notification settings - Fork 61
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
RUM-807 Add SR integration tests for TextView and EditText view type #1593
RUM-807 Add SR integration tests for TextView and EditText view type #1593
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #1593 +/- ##
===========================================
+ Coverage 83.58% 83.62% +0.04%
===========================================
Files 443 443
Lines 15122 15122
Branches 2264 2264
===========================================
+ Hits 12639 12645 +6
+ Misses 1885 1873 -12
- Partials 598 604 +6 |
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.
lgtm. I left few comments, but they are not blocking.
internal const val ALLOW = 1 | ||
internal const val MASK_USER_INPUT = 2 | ||
internal const val MASK = 3 |
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.
are they needed? we can add SessionReplayPrivacy
enum values to the intent extra directly and read them back using getSerializableExtra
, because any enum is serializable.
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.
yes, check the tests as I have one for each of these values and pass those values in the IntentExtras :
https://github.com/DataDog/dd-sdk-android/pull/1593/files#diff-a691b85cf560e7461b22d88e7bd08c8d5ec192584d8da98cb159fb568c5e6ec4R28
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.
I am not sure we can pass an Enum
in a Bundle, are we ?
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.
yes, we can, so these values are not needed.
EXACT, | ||
CONTAINS |
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.
maybe we should document it.
// we will use a large long task threshold to make sure we will not have LongTask events | ||
// noise in our integration tests. |
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.
since we don't check RUM data, it is probably not needed.
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.
yup was a leftover
19ee787
to
b861ba4
Compare
b861ba4
to
cfc5d47
Compare
ed6f602
to
8c452f0
Compare
8c452f0
to
7a2f184
Compare
What does this PR do?
Testing Strategy
This PR lays the groundwork for a testing approach that focuses on verifying the Transformer/Persister component. The core idea is to compare the persisted JSON payload with a predefined expected payload derived from screen elements.
By systematically assessing the JSON payload against the expected output, we can effectively identify and prevent potential regressions during development.
This initial implementation covers a simple View containing a TextView and an EditText. Future enhancements will expand the test coverage to encompass more complex UI elements and interactions. This will come up in the following PRs.
Expected Benefits
This new testing strategy is expected to significantly improve the overall quality and stability of the Session Replay feature by proactively detecting and addressing regression issues.
Motivation
What inspired you to submit this pull request?
Additional Notes
Anything else we should know when reviewing?
Review checklist (to be filled by reviewers)