Skip to content

RUM-1520 create RUM Feature Integration Tests#2004

Merged
xgouchet merged 2 commits into
developfrom
xgouchet/RUM-1520/rum_sfit
Apr 23, 2024
Merged

RUM-1520 create RUM Feature Integration Tests#2004
xgouchet merged 2 commits into
developfrom
xgouchet/RUM-1520/rum_sfit

Conversation

@xgouchet

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
Contributor 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
Copy Markdown
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
Copy Markdown
Contributor 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
Copy Markdown
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
@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