Skip to content

✅ [RUM-14696] Improve microfrontend e2e test - plugin + module federation#4220

Open
amortemousque wants to merge 2 commits intomainfrom
aymeric/e2e-test-microfrontend
Open

✅ [RUM-14696] Improve microfrontend e2e test - plugin + module federation#4220
amortemousque wants to merge 2 commits intomainfrom
aymeric/e2e-test-microfrontend

Conversation

@amortemousque
Copy link
Collaborator

Motivation

Improve the microfrontend end-to-end test to rely on a real test app configured with Module Federation and the built plugin.

Changes

  • Create a test app with:
    • Module Federation 2.0, including one shell and two remotes
    • The built @datadog/webpack-plugin configured with source code context
image
  • Add tests that verify every RUM event type includes the service and version set by the build plugin
image

Test instructions

Checklist

  • Tested locally
  • Tested on staging
  • Added unit tests for this change.
  • Added e2e/integration tests for this change.
  • Updated documentation and/or relevant AGENTS.md file

@amortemousque amortemousque requested a review from a team as a code owner February 20, 2026 21:28
@datadog-datadog-prod-us1-2
Copy link

datadog-datadog-prod-us1-2 bot commented Feb 20, 2026

⚠️ Tests

Fix all issues with BitsAI or with Cursor

⚠️ Warnings

🧪 1 Test failed

microfrontend › RUM › with source code bundler plugin › errors from DD_RUM.addError should have service and version from source code context from microfrontend.scenario.ts (Datadog) (Fix with Cursor)
microfrontend.scenario.ts:243:17 errors from DD_RUM.addError should have service and version from source code context

[Firefox] › microfrontend.scenario.ts:243:17 › microfrontend › RUM › with source code bundler plugin › errors from DD_RUM.addError should have service and version from source code context 

    Error: expect(received).toMatchObject(expected)

    - Expected  - 10
    + Received  +  1

    - Array [
...

ℹ️ Info

❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 77.19% (+0.00%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 2073494 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback!

@amortemousque amortemousque changed the title [RUM-14696] Improve microfrontend e2e test - plugin + module federatoin ✅ [RUM-14696] Improve microfrontend e2e test - plugin + module federatoin Feb 20, 2026
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 663b2823fe

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

createTest('LOAf should have service and version from source code context')
.withRum(RUM_CONFIG)
.withSetup(microfrontendSetup)
.run(async ({ intakeRegistry, flushEvents, page }) => {

Choose a reason for hiding this comment

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

P1 Badge Skip LOAF assertion outside Chromium

This test now runs the long-task assertion on every Playwright project, but the suite still executes Firefox/WebKit projects and those browsers do not emit the long-task entries this assertion depends on (the repo already guards similar checks with test.skip(browserName !== 'chromium', ...) in other scenarios). As written, rumLongTaskEvents can be empty off Chromium, so the strict toMatchObject([...]) expectation makes this scenario fail in multi-browser runs.

Useful? React with 👍 / 👎.

@amortemousque amortemousque force-pushed the aymeric/e2e-test-microfrontend branch from 663b282 to 04c7109 Compare February 23, 2026 14:19
@cit-pr-commenter-54b7da
Copy link

cit-pr-commenter-54b7da bot commented Feb 23, 2026

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 172.21 KiB 172.21 KiB 0 B 0.00%
Rum Profiler 4.71 KiB 4.71 KiB 0 B 0.00%
Rum Recorder 24.88 KiB 24.88 KiB 0 B 0.00%
Logs 56.29 KiB 56.29 KiB 0 B 0.00%
Flagging 944 B 944 B 0 B 0.00%
Rum Slim 127.99 KiB 127.99 KiB 0 B 0.00%
Worker 23.63 KiB 23.63 KiB 0 B 0.00%
🚀 CPU Performance
Action Name Base CPU Time (ms) Local CPU Time (ms) 𝚫%
addglobalcontext N/A 0.005 N/A
addaction N/A 0.0142 N/A
adderror N/A 0.0163 N/A
addtiming N/A 0.0039 N/A
startview N/A 0.0137 N/A
startstopsessionreplayrecording N/A 0.0009 N/A
logmessage N/A 0.0199 N/A
🧠 Memory Performance
Action Name Base Memory Consumption Local Memory Consumption 𝚫
addglobalcontext N/A 27.50 KiB N/A
addaction N/A 111.69 KiB N/A
addtiming N/A 26.27 KiB N/A
adderror N/A 115.12 KiB N/A
startstopsessionreplayrecording N/A 25.84 KiB N/A
startview N/A 514.88 KiB N/A
logmessage N/A 44.53 KiB N/A

🔗 RealWorld

@amortemousque amortemousque force-pushed the aymeric/e2e-test-microfrontend branch 6 times, most recently from e35d121 to b2f5101 Compare February 24, 2026 17:07
@amortemousque amortemousque force-pushed the aymeric/e2e-test-microfrontend branch from b2f5101 to c99e2ee Compare February 24, 2026 17:08
Copy link
Collaborator

@bcaudan bcaudan left a comment

Choose a reason for hiding this comment

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

LGTM

@amortemousque amortemousque changed the title ✅ [RUM-14696] Improve microfrontend e2e test - plugin + module federatoin ✅ [RUM-14696] Improve microfrontend e2e test - plugin + module federation Mar 2, 2026
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.

3 participants