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

test(wasm): Move WASM test to Playwright and remove Puppeteer #7217

Merged
merged 3 commits into from
Feb 17, 2023

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented Feb 17, 2023

This PR moves the integration test for our WASM integration to our Playwright browser integration test suite. With this change we finally get rid of Puppeteer in our monorepo.

For this to work, I had to make a few adjustments:

  • Similarly to how we inject integrations (feat(tests): Inject @sentry/integrations bundles to Playwright templates #6666), we can now also inject the WASM integration bundle into our test fixtures
  • Because our PW tests run "locally", meaning we don't serve the page(s), we can't use fetch(simple.wasm) to load the WASM module anymore like we used to in puppeteer. Instead, we fake an http request and return the WASM module in the response (see test.ts).

Generally, I had to make some adjustments to translate the old test setup to our PW tests but I tried to keep changes minimal and the core test didn't change at all.

Because this test was the only test in the WASM package, we can get rid of quite a few files.

closes #6054

@Lms24 Lms24 requested review from a team, lforst and AbhiPrasad and removed request for a team February 17, 2023 11:38
Copy link
Member

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

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

Nice - like the usage of playwright to serve the wasm file

@Lms24 Lms24 force-pushed the lms/mv-wasm-integration-tests branch from a1a0c1c to d0ccf02 Compare February 17, 2023 11:50
@github-actions
Copy link
Contributor

github-actions bot commented Feb 17, 2023

Replay SDK metrics 🚀

    Plain +Sentry +Replay
Revision Value Value Diff Ratio Value Diff Ratio
LCP This PR 82db382 68.00 ms 100.15 ms +32.15 ms +47.28 % 128.36 ms +60.36 ms +88.76 %
Previous 09c6cbe 80.54 ms 108.53 ms +28.00 ms +34.76 % 133.05 ms +52.51 ms +65.20 %
CLS This PR 82db382 0.06 ms 0.06 ms -0.00 ms -0.40 % 0.06 ms +0.00 ms +0.11 %
Previous 09c6cbe 0.06 ms 0.06 ms +0.00 ms +0.05 % 0.06 ms +0.00 ms +0.19 %
CPU This PR 82db382 13.93 % 13.87 % -0.06 pp -0.40 % 19.91 % +5.98 pp +42.93 %
Previous 09c6cbe 20.31 % 21.21 % +0.90 pp +4.44 % 28.46 % +8.15 pp +40.13 %
JS heap avg This PR 82db382 1.94 MB 2.01 MB +63.3 kB +3.26 % 2.87 MB +926.24 kB +47.67 %
Previous 09c6cbe 1.94 MB 2 MB +53.31 kB +2.74 % 2.87 MB +925.44 kB +47.64 %
JS heap max This PR 82db382 2.3 MB 2.56 MB +253.24 kB +10.99 % 3.35 MB +1.04 MB +45.31 %
Previous 09c6cbe 2.3 MB 2.58 MB +271.49 kB +11.79 % 3.36 MB +1.06 MB +45.91 %
netTx This PR 82db382 0 B 0 B 0 B n/a 2.22 kB +2.22 kB n/a
Previous 09c6cbe 0 B 0 B 0 B n/a 2.22 kB +2.22 kB n/a
netRx This PR 82db382 0 B 0 B 0 B n/a 41 B +41 B n/a
Previous 09c6cbe 0 B 0 B 0 B n/a 41 B +41 B n/a
netCount This PR 82db382 0 0 0 n/a 1 +1 n/a
Previous 09c6cbe 0 0 0 n/a 1 +1 n/a
netTime This PR 82db382 0.00 ms 0.00 ms 0.00 ms n/a 75.00 ms +75.00 ms n/a
Previous 09c6cbe 0.00 ms 0.00 ms 0.00 ms n/a 76.58 ms +76.58 ms n/a

Previous results on branch: develop

RevisionLCPCLSCPUJS heap avgJS heap maxnetTxnetRxnetCountnetTime
09c6cbe+52.51 ms+0.00 ms+8.15 pp+925.44 kB+1.06 MB+2.22 kB+41 B+1+76.58 ms
1cf8988+53.81 ms-0.00 ms+4.80 pp+929.88 kB+1.05 MB+2.22 kB+41 B+1+91.07 ms
68655e3+72.60 ms+0.00 ms+7.90 pp+922.72 kB+1.04 MB+2.22 kB+41 B+1+109.40 ms
a8449de+58.27 ms-0.00 ms+7.12 pp+927.42 kB+1.05 MB+2.2 kB+41 B+1+98.31 ms
79babe9+58.69 ms-0.00 ms+4.40 pp+927.46 kB+1.06 MB+2.23 kB+41 B+1+103.20 ms
5359ba9+55.62 ms-0.00 ms+4.29 pp+935.26 kB+1.05 MB+2.2 kB+41 B+1+79.05 ms

*) pp - percentage points - an absolute difference between two percentages.
Last updated: Fri, 17 Feb 2023 12:10:43 GMT

Copy link
Member

@mydea mydea left a comment

Choose a reason for hiding this comment

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

nice, great to get rid of this and streamline this 🎉

@Lms24 Lms24 force-pushed the lms/mv-wasm-integration-tests branch from d0ccf02 to a1169a1 Compare February 17, 2023 13:23
@Lms24 Lms24 force-pushed the lms/mv-wasm-integration-tests branch from a1169a1 to 4ece78a Compare February 17, 2023 13:54
@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 20.05 KB (-0.02% 🔽)
@sentry/browser - ES5 CDN Bundle (minified) 62.14 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.68 KB (-0.02% 🔽)
@sentry/browser - ES6 CDN Bundle (minified) 55.29 KB (0%)
@sentry/browser - Webpack (gzipped + minified) 20.41 KB (0%)
@sentry/browser - Webpack (minified) 66.73 KB (0%)
@sentry/react - Webpack (gzipped + minified) 20.44 KB (-0.01% 🔽)
@sentry/nextjs Client - Webpack (gzipped + minified) 47.78 KB (0%)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 26.93 KB (-0.01% 🔽)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 25.2 KB (-0.01% 🔽)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 42.57 KB (-0.01% 🔽)
@sentry/replay - Webpack (gzipped + minified) 36.78 KB (0%)
@sentry/browser + @sentry/tracing + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 60.2 KB (-0.01% 🔽)
@sentry/browser + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 53.8 KB (-0.01% 🔽)

@Lms24 Lms24 merged commit 00d2360 into develop Feb 17, 2023
@Lms24 Lms24 deleted the lms/mv-wasm-integration-tests branch February 17, 2023 14:31
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.

Use playwright instead of puppeteer in @sentry/wasm tests
3 participants