Skip to content

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

Merged
Lms24 merged 3 commits into
developfrom
lms/mv-wasm-integration-tests
Feb 17, 2023
Merged

test(wasm): Move WASM test to Playwright and remove Puppeteer#7217
Lms24 merged 3 commits into
developfrom
lms/mv-wasm-integration-tests

Conversation

@Lms24

Copy link
Copy Markdown
Member

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, AbhiPrasad and lforst and removed request for a teamFebruary 17, 2023 11:38

@AbhiPrasadAbhiPrasad left a comment

Copy link
Copy Markdown
Contributor

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
Lms24force-pushed the lms/mv-wasm-integration-tests branch from a1a0c1c to d0ccf02CompareFebruary 17, 2023 11:50
@github-actions

github-actionsBot commented Feb 17, 2023

Copy link
Copy Markdown
Contributor

Replay SDK metrics 🚀

Plain+Sentry+Replay
RevisionValueValueDiffRatioValueDiffRatio
LCPThis PR 82db38268.00 ms100.15 ms+32.15 ms+47.28 %128.36 ms+60.36 ms+88.76 %
Previous 09c6cbe80.54 ms108.53 ms+28.00 ms+34.76 %133.05 ms+52.51 ms+65.20 %
CLSThis PR 82db3820.06 ms0.06 ms-0.00 ms-0.40 %0.06 ms+0.00 ms+0.11 %
Previous 09c6cbe0.06 ms0.06 ms+0.00 ms+0.05 %0.06 ms+0.00 ms+0.19 %
CPUThis PR 82db38213.93 %13.87 %-0.06 pp-0.40 %19.91 %+5.98 pp+42.93 %
Previous 09c6cbe20.31 %21.21 %+0.90 pp+4.44 %28.46 %+8.15 pp+40.13 %
JS heap avgThis PR 82db3821.94 MB2.01 MB+63.3 kB+3.26 %2.87 MB+926.24 kB+47.67 %
Previous 09c6cbe1.94 MB2 MB+53.31 kB+2.74 %2.87 MB+925.44 kB+47.64 %
JS heap maxThis PR 82db3822.3 MB2.56 MB+253.24 kB+10.99 %3.35 MB+1.04 MB+45.31 %
Previous 09c6cbe2.3 MB2.58 MB+271.49 kB+11.79 %3.36 MB+1.06 MB+45.91 %
netTxThis PR 82db3820 B0 B0 Bn/a2.22 kB+2.22 kBn/a
Previous 09c6cbe0 B0 B0 Bn/a2.22 kB+2.22 kBn/a
netRxThis PR 82db3820 B0 B0 Bn/a41 B+41 Bn/a
Previous 09c6cbe0 B0 B0 Bn/a41 B+41 Bn/a
netCountThis PR 82db382000n/a1+1n/a
Previous 09c6cbe000n/a1+1n/a
netTimeThis PR 82db3820.00 ms0.00 ms0.00 msn/a75.00 ms+75.00 msn/a
Previous 09c6cbe0.00 ms0.00 ms0.00 msn/a76.58 ms+76.58 msn/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

@mydeamydea left a comment

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.

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

@Lms24
Lms24force-pushed the lms/mv-wasm-integration-tests branch from d0ccf02 to a1169a1CompareFebruary 17, 2023 13:23
@Lms24
Lms24force-pushed the lms/mv-wasm-integration-tests branch from a1169a1 to 4ece78aCompareFebruary 17, 2023 13:54
@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize
@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 developFeb 17, 2023
@Lms24
Lms24 deleted the lms/mv-wasm-integration-tests branch February 17, 2023 14:31
Sign up for freeto 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

@Lms24@mydea@AbhiPrasad