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 |
0xnm
left a comment
There was a problem hiding this comment.
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.
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.
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.
I am not sure we can pass an Enum in a Bundle, are we ?
There was a problem hiding this comment.
yes, we can, so these values are not needed.
| EXACT, | ||
| CONTAINS |
| // 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.
since we don't check RUM data, it is probably not needed.
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)