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

RUM-1520 create RUM Feature Integration Tests #2004

Merged
merged 2 commits into from
Apr 23, 2024

Conversation

xgouchet
Copy link
Member

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

@xgouchet xgouchet requested review from a team as code owners April 22, 2024 13:06
// Then
val eventsWritten = stubSdkCore.eventsWritten(Feature.RUM_FEATURE_NAME)
StubEventsAssert.assertThat(eventsWritten)
.hasRumEvent(1) {
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point ;)

val result = GlobalRumMonitor.get(stubSdkCore)

// Then
// We use reflexion because that class is marked internal
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// 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 😄

Copy link
Member Author

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 :/

Comment on lines 27 to 45
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)
}
Copy link
Member

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

@xgouchet xgouchet merged commit b16515e into develop Apr 23, 2024
22 checks passed
@xgouchet xgouchet deleted the xgouchet/RUM-1520/rum_sfit branch April 23, 2024 06:31
@xgouchet xgouchet added this to the 2.9.X milestone Jul 31, 2024
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.

2 participants