Large Scale Extension Development Tips?

130 views
Skip to first unread message

Joseph Lust

unread,
May 31, 2019, 4:06:05 PM5/31/19
to Chromium Extensions
Chrome Extension Devs,

I was curious if anyone could chime in on how they develop Chrome Extensions @ scale. For example, I work on the mabl Trainer extension where we've made 346 releases across 20 developers. We've had to cook up a lot of bespoke solutions to handle this workflow. 

Does anyone have examples of how they keep up a CI/CD pipeline, browser automate testing their extension, push internal canary releases, etc? I'm always keen to understand how others have solved such problems.


Thanks for your insights,
Joe

Darren Govoni

unread,
May 31, 2019, 5:42:58 PM5/31/19
to Joseph Lust, Chromium-extensions
We build the crx in our server build scripts and extract the id and use that to update features in our server process that hosts updates to the extension and backend services. 

The enterprise group policy has the desktop chrome update url set for our extension. But its mapped to a "latest" url that never changes but provides update info for the latest numerical release and build. E.g. 0.29.0

All our update paths and backend URLs used by the extension include the version number so we can do rolling updates without impacting users of different users.

Automated testing is a bit more tricky but we have a landing page that exercises a variety of internal extension features and registers a pass fail.

--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/ee8efcc6-4ac9-4ed1-bab3-79570d24eb28%40chromium.org.

Alexei Miagkov

unread,
Jun 1, 2019, 11:04:50 AM6/1/19
to Joseph Lust, Chromium-extensions
Privacy Badger has a number of functional tests, powered by Selenium, that exercise the actual extension (with various hacks to allow for testing things that aren't programmatically controllable such as the browser popup) in a number of scenarios. You can visit https://github.com/EFForg/privacybadger/blob/master/doc/tests.md to learn more.

Scott Fortmann-Roe

unread,
Jun 2, 2019, 6:08:58 AM6/2/19
to Alexei Miagkov, Joseph Lust, Chromium-extensions
We also use Selenium for testing browser behavior. It's really important to be able to test against a real Chrome instance if you are doing things with content scripts that modify page behavior.

Additionally, since there is a long tail of users on older Chrome versions, we have a set of Docker containers for the current Chrome, beta Chrome, and older Chrome versions and test against them as part of our CI pipeline.

Simeon Vincent

unread,
Jun 6, 2019, 11:56:58 AM6/6/19
to Chromium Extensions, amia...@gmail.com, lifeo...@gmail.com
I'm curious if anyone is using Puppeteer for automated testing, directly or indirectly. I ask because some of those folks are a short walk away and I'd be happy to share your feedback with them.

Scott, how long is your long tail? For my personal projects I tend to target the capabilities of Chrome N - 1, but I'm sure that's very different from the user-base you're supporting.

Simeon - @dotproto
Extensions Developer Advocate


On Sunday, June 2, 2019 at 3:08:58 AM UTC-7, Scott Fortmann-Roe wrote:
We also use Selenium for testing browser behavior. It's really important to be able to test against a real Chrome instance if you are doing things with content scripts that modify page behavior.

Additionally, since there is a long tail of users on older Chrome versions, we have a set of Docker containers for the current Chrome, beta Chrome, and older Chrome versions and test against them as part of our CI pipeline.

On Sat, Jun 1, 2019 at 5:04 PM Alexei Miagkov <ami…@gmail.com> wrote:
Privacy Badger has a number of functional tests, powered by Selenium, that exercise the actual extension (with various hacks to allow for testing things that aren't programmatically controllable such as the browser popup) in a number of scenarios. You can visit https://github.com/EFForg/privacybadger/blob/master/doc/tests.md to learn more.

On Fri, May 31, 2019 at 5:42 PM Darren Govoni <dar…@gmail.com> wrote:
We build the crx in our server build scripts and extract the id and use that to update features in our server process that hosts updates to the extension and backend services. 

The enterprise group policy has the desktop chrome update url set for our extension. But its mapped to a "latest" url that never changes but provides update info for the latest numerical release and build. E.g. 0.29.0

All our update paths and backend URLs used by the extension include the version number so we can do rolling updates without impacting users of different users.

Automated testing is a bit more tricky but we have a landing page that exercises a variety of internal extension features and registers a pass fail.

Scott Fortmann-Roe

unread,
Jun 9, 2019, 11:53:05 AM6/9/19
to Simeon Vincent, Chromium Extensions, Alexei Miagkov, Joseph Lust
Sorry, I don't have any hard data on old Chrome usage, I've just been bitten by the issue in the past.

The specific case that made me start testing against older version of Chrome was when I decided to use native ES6 modules in the extension. I waited for a number of Chrome releases after ES6 module support landed (Chrome 61). Then when I coded and released the extension version using native ES6 modules (somewhere around Chrome 65), I restricted access to Chrome 62 and above just to make sure any module issues in the initial Chrome 61 release got worked out. Unfortunately, it turned out there was a bug I was unaware of where extensions with modules still didn't work in Chrome 62 (https://bugs.chromium.org/p/chromium/issues/detail?id=769012), and then had to scramble to push out a fix when it started breaking for people on older versions.

Anyways, long story short, I definitely think it makes sense to test against old versions if you are relying on any sort of "cutting edge" browser features.

--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
Reply all
Reply to author
Forward
0 new messages