Skip to content

✅ [PANA-6831] Support the Change data format in E2E tests#4447

Merged
sethfowler-datadog merged 1 commit intomainfrom
seth.fowler/PANA-6831-support-change-records-in-e2e-tests
Apr 10, 2026
Merged

✅ [PANA-6831] Support the Change data format in E2E tests#4447
sethfowler-datadog merged 1 commit intomainfrom
seth.fowler/PANA-6831-support-change-records-in-e2e-tests

Conversation

@sethfowler-datadog
Copy link
Copy Markdown
Contributor

Motivation

As we transition away from the old V1 session replay data format and to the new Change format, we need to update all tests to support both formats. (Eventually, we'll remove the V1 tests, but we're not quite there yet.) The E2E tests currently don't support the Change data format, so we need to update them.

Changes

This PR updates all recording E2E tests that involve DOM mutations to support both the V1 and Change data formats.

I used one of two strategies.

For tests which involve nothing but full or incremental DOM mutations, I split the test into two totally separate implementations, one for the V1 format and one for the Change format. I switched to a snapshot testing model for the Change format implementation; my experience is that for these kinds of data format tests, this approach is the most effective at catching bugs and makes maintenance easy.

Some tests involve a mix of DOM mutations and other kinds of incremental mutations. Because only DOM mutations have been converted to use the new Change format, these tests mix together records with very different formats. This makes snapshot testing a bit awkward for now; it's easier to write specific assertions. For these tests, I used a unified implementation for both the V1 and Change formats, and relied on helpers that have different code paths internally to support both cases.

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

@sethfowler-datadog sethfowler-datadog requested review from a team as code owners April 6, 2026 16:13
@datadog-prod-us1-4
Copy link
Copy Markdown

datadog-prod-us1-4 Bot commented Apr 6, 2026

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 0.00%
Overall Coverage: 77.12% (-0.49%)

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

@cit-pr-commenter-54b7da
Copy link
Copy Markdown

cit-pr-commenter-54b7da Bot commented Apr 6, 2026

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 177.94 KiB 177.94 KiB 0 B 0.00%
Rum Profiler 6.16 KiB 6.16 KiB 0 B 0.00%
Rum Recorder 27.03 KiB 27.03 KiB 0 B 0.00%
Logs 56.40 KiB 56.40 KiB 0 B 0.00%
Rum Slim 133.81 KiB 133.81 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) 𝚫%
RUM - add global context 0.0045 0.0051 +13.33%
RUM - add action 0.0143 0.0173 +20.98%
RUM - add error 0.0134 0.0206 +53.73%
RUM - add timing 0.0032 0.0031 -3.13%
RUM - start view 0.0142 0.0132 -7.04%
RUM - start/stop session replay recording 0.0007 0.0008 +14.29%
Logs - log message 0.0142 0.0163 +14.79%
🧠 Memory Performance
Action Name Base Memory Consumption Local Memory Consumption 𝚫
RUM - add global context 27.50 KiB 26.64 KiB -879 B
RUM - add action 96.72 KiB 97.31 KiB +602 B
RUM - add timing 26.30 KiB 26.34 KiB +48 B
RUM - add error 97.86 KiB 82.32 KiB -15.55 KiB
RUM - start/stop session replay recording 26.29 KiB 26.23 KiB -67 B
startview N/A 476.73 KiB N/A
Logs - log message 102.30 KiB 97.34 KiB -4.96 KiB

🔗 RealWorld

@sethfowler-datadog sethfowler-datadog force-pushed the seth.fowler/PANA-6846-make-whitespace-consistent-between-e2e-setups branch from 8966aea to be3970d Compare April 10, 2026 10:55
@sethfowler-datadog sethfowler-datadog force-pushed the seth.fowler/PANA-6831-support-change-records-in-e2e-tests branch from 3ac1d97 to fdb716e Compare April 10, 2026 10:56
Base automatically changed from seth.fowler/PANA-6846-make-whitespace-consistent-between-e2e-setups to main April 10, 2026 16:29
@sethfowler-datadog sethfowler-datadog force-pushed the seth.fowler/PANA-6831-support-change-records-in-e2e-tests branch from fdb716e to 13483b3 Compare April 10, 2026 16:30
@sethfowler-datadog sethfowler-datadog merged commit 164ddc4 into main Apr 10, 2026
22 checks passed
@sethfowler-datadog sethfowler-datadog deleted the seth.fowler/PANA-6831-support-change-records-in-e2e-tests branch April 10, 2026 17:51
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants