Tools & Frameworks

In-depth tutorials and comparisons for testing tools and frameworks — Playwright, Cypress, Selenium, Robot Framework, and more.

Testing Service Workers with Workbox, jest-service-worker, and sw-test-env

Test Automation

Testing Service Workers with Workbox, jest-service-worker, and sw-test-env

Test Workbox service workers at three levels: unit test routing strategies with workbox-strategies in a mocked environment, integration test fetch behavior using sw-test-env which runs your service worker in Node.js, and end-to-end test cache behavior with Playwright. The makeServiceWorkerEnv() function from jest-service-worker (now service-worker-mock) gives you a DOM-less environment

By HelpMeTest
Testing Browser Extensions with Playwright (Chromium and Firefox)

Test Automation

Testing Browser Extensions with Playwright (Chromium and Firefox)

Playwright supports browser extension testing in Chromium (full support) and Firefox (experimental). Use chromium.launchPersistentContext() with --load-extension and --disable-extensions-except flags. For Firefox, launch with firefox.launchPersistentContext() and set firefox_profile preferences. Access the extension popup by navigating directly to its chrome-extension:// URL. Key Takeaways Use launchPersistentContext, not browser.newPage. Extensions

By HelpMeTest