-
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-1520 create RUM Feature Integration Tests #2004
Conversation
// Then | ||
val eventsWritten = stubSdkCore.eventsWritten(Feature.RUM_FEATURE_NAME) | ||
StubEventsAssert.assertThat(eventsWritten) | ||
.hasRumEvent(1) { |
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.
minor: maybe we need to make use of the named argument here, otherwise it is hard to understand what 1
means here without looking at the assertion method implementation details.
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.
Good point ;)
...y/single-fit/rum/src/test/kotlin/com/datadog/android/rum/integration/RumConfigurationTest.kt
Show resolved
Hide resolved
val result = GlobalRumMonitor.get(stubSdkCore) | ||
|
||
// Then | ||
// We use reflexion because that class is marked internal |
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.
// We use reflexion because that class is marked internal | |
// We use reflection because that class is marked internal |
although reflexion
can also exist in English - archaic spelling of reflection
😄
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.
Yeah I always struggle between the french and english spellings :/
.../single-fit/rum/src/test/kotlin/com/datadog/android/rum/integration/ManualTrackingRumTest.kt
Show resolved
Hide resolved
fun hasSessionType(sessionType: String) { | ||
hasField("session.type", sessionType) | ||
} | ||
|
||
fun hasSource(source: String) { | ||
hasField("source", source) | ||
} | ||
|
||
fun hasType(type: String) { | ||
hasField("type", type) | ||
} | ||
|
||
fun hasViewUrl(viewUrl: String) { | ||
hasField("view.url", viewUrl) | ||
} | ||
|
||
fun hasViewName(viewName: String) { | ||
hasField("view.name", viewName) | ||
} |
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.
these methods also should return this
for the API consistency
What does this PR do?
Creates a first draft of the RUM Feature Integration tests.
It's not exhaustive yet as there's a lot to cover, but it provides a first basis to expand upon