Explorative testing – what is your approach?

How do you test your add-ons – in an explorative way?

I put a relatively clean browser profile (with some added bookmarks and specific settings) in my development directory and I run web-ext with a couple of parameters:

web-ext run --pref=browser.link.open_newwindow=3 --source-dir src --firefox='/Applications/Firefox Developer Edition.app/Contents/MacOS/firefox-bin' --firefox-profile=testdata/ff-profile --browser-console

It works, but it feels a bit… amateurish. What is your approach?

Hi

I tend to create an .xpi then load into a clean new profile through about:debugging.

1 Like

Two questions:

  • Did you experience any problems with outdated profiles after major updates? Or do you create a clean profile now and then (or automatically)?

  • Have you experienced problems with clean profiles? Whenever I use a clean profile and load a temporary add-on, the preference pane (options_ui) doesn’t show up in about:addons.

I am not even sure what exactly equates to a “clean” profile. I thought I had one, but then I looked into extensions.json and found all sorts of absolute paths to long uninstalled extensions.

I have never had a problem with it.

I go to about:profiles and create a “test” profile. Do what I need to do to test the add-on and then delete the profile.

I guess that’s the better approach.
I just wonder if I can automate this…

Which part would you like to automate, creating the profile?

I would like to automatically create the profile.
I want to load the temporary add-on automatically.
If possible, I would also like to add a few bookmarks to the clean profile and position the add-on button on the toolbar.
Then I want to see the console.

Everything you describe should already happen with the web-ext run command you described in your first post? Using a base profile is the best approach for having things like bookmarks pre-loaded.

Did you experience any problems with outdated profiles after major updates?

Firefox should apply any required changes to the profile whenever it is started. So you shouldn’t see any inherent issues, though at some point old migration code might get removed, so you would likely want to write your updated profile to disk every now and then.

Have you experienced problems with clean profiles? Whenever I use a clean profile and load a temporary add-on, the preference pane (options_ui) doesn’t show up in about:addons.

If you don’t have your extension ID defined in your manifest.json that might be worth a try. Else, the web dev tools console should have details on what’s going on (or at least a cryptic error).

If you are displeased with some details about web-ext all of it is open-source, so you can use the pieces it uses for the run command that you like and assemble your own.

2 Likes

There are lots of moving parts and when something doesn’t work as expected it’s a bit hard to pinpoint the culprit. That’s why I was asking for best practices…

After some yak shaving I came to the conclusion that it is not a good idea to store my testing profile in a non-default directory. I made a new profile with the root directory set in /Application Support/Firefox/Profiles/ and now my options_ui preference pane shows up.

1 Like