Home
Starting Up
Case Studies DB
Products
Ideas DB
Vibe Coding Tools
Subscribe to IH+
Starting Up
Case Studies
Ideas DB
Products DB
Sign in
Join
5
Likes
4
Comments
What automated testing strategies do you use?
by
Jaap Badlands
Hey all, just wondering what automated testing strategies you use, if any, with your extensions.
Our automated testing infrastructure for PixieBrix is definitely still a work in progress, but here's some notes:
You can checkout the pixiebrix-extension repository on GitHub for how we set things up.
We'll be looking to set up Puppeteer soon
@rfitz hoping you have some ideas / suggestions here.
I've typically just done a combination of Puppeteer, regular React component testing, and unit tests (Jest) and that will normally give me enough confidence in my extension.
The React component testing and unit tests are done like you would in any other app, but the Puppeteer requires a little bit of extra setup (you need some additional flags like
--disable-extensions-exceptfor it to run). After that, you can load up your extension headless via Puppeteer and simulate clicks, scroll, etc similar to Selenium.Another thing that goes a long way is setting up proper error tracking so you can be responsive to anything that may come up. Much like everything else in extension development, it's a bit trickier to setup than in a normal app, but overall not much work. I wrote about that a bit here.
Hope that helps a bit!
I'd be interested to know as well.
Addons are generally a pain to automate in general, tho testing of various parts of the addons might be a much easier proposition. Previously, the least that I've done was to separate the UI (popup and full addon pages) and build them with React. This way I could at least test the functionality of the front end.
Before that, I've used selenium to auto run and addon over about 1000 sites and then compare the output of what the addon is supposed to have with what I know is supposed to happen. This was a painful setup in just about every piece from setting up browser, to running this somewhere in a cloud, to updating the test, etc etc.