How to run integration / e2e tests for a Chrome extension in 2021?

Viewed 1211

I'm building a Chrome extension that removes some content from a website. I wanted to set up some integration and e2e tests on it in order to check...

  1. functions that set values in the chrome.storage API
  2. interactions with the extension's UI (i.e. when you click the extension icon next to the address bar)
  3. whether the extension works well from an e2e standpoint

I'm a beginner in testing and I'm struggling to figure out what would be the best approach. Here's the options I've looked at so far:

  • Cypress - can only do a part of 3; I say "a part" because the e2e would require me to look at changes in the chrome.storage API.
  • Puppeteer & Jest - could work for Chrome, but features in Firefox are experimental and I'm planning to make the extension compatible with that browser.
  • Selenium & Jest - seems like the only one that could work, but most of the answers I see here are from +3 years ago and it seems to require a lot to set up.

Is Selenium still the only option in 2021 for testing Chrome extensions?

1 Answers
Related