Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Recommended Testing Frameworks for Extension Rendering

94 views
Skip to first unread message

Jacob Lynch

unread,
Jul 13, 2020, 4:55:00 PM7/13/20
to Chromium Extensions
Hi, 

I'm creating an extension that modifies the DOM of some pages to add information to a shopping experience. I want to automate tests to see if the button loads on different pages. Are there frameworks to do this? One option I thought about is saving the HTML of a page I'm looking to test and writing tests to render the content on these pages. Any help would be greatly appreciated!

Thanks!

mur...@influesolutions.com

unread,
Jul 14, 2020, 2:32:09 PM7/14/20
to Chromium Extensions, ja...@ahara.bio
This is interesting. I would like to know too.

Ardy Naghshineh

unread,
Jul 14, 2020, 2:35:00 PM7/14/20
to Chromium Extensions
I would write some Jest tests and use Puppeteer to spin up a Chromium with my extension setup on it. Then you can navigate to different pages on the target site and check if the extension is working as intended.
You can use jest-image-snapshots too to do some visual testing.

Simeon Vincent

unread,
Jul 14, 2020, 3:35:10 PM7/14/20
to Ardy Naghshineh, Chromium Extensions
One notable drawback of Puppeteer is that you can't script Chrome UI, so you won't be able to test interactions with your extension's browser action. If you're okay with that limitation, then Ardy's advice sounds good to me.

Cheers,

Simeon - @dotproto
Developer Advocate for Chrome Extensions


--
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/fb369514-538d-43a1-acbf-7d6164743974o%40chromium.org.

Anurima Sharma

unread,
Jul 19, 2020, 6:45:49 PM7/19/20
to Chromium Extensions, Simeon Vincent, Chromium Extensions, Ardy Naghshineh
Could one of you explain how you have been able to load chrome extensions with Puppeteer, as I have not had any success? I have tried launching Puppeteer with:
"--disable-extensions-except=/build",
"--load-extension=/build",
but no luck. Any other suggestions?
Reply all
Reply to author
Forward
0 new messages