How to setup a Firefox Test Environment
It happens that I stumble upon an extension, tweak or tip for the Firefox browser that I'd like to try out. I could obviously try it out on the version of the browser that I use on a day to day basis, but the possibility is there that it could lead to unforeseen issues.
Issues may include privacy or security problems, or changes in the interface or browser behavior. And while it is usually not a problem to restore the old status quo, it sometimes can become a problem if that's not entirely possible.
A different version of Firefox can also be useful if you want to test browser or add-on updates before you apply them to systems you or others work on, or want to make sure that your favorite add-ons are compatible with a new version of Firefox before you upgrade.
A Firefox test environment is the perfect alternative, as long as it does not share data with the default browser version.
This tutorial explains how to setup a test environment that you can use to test add-ons or tweaks without affecting the default browser that you use regularly.
A few options are available: A portable version of Firefox could be enough for some users, others may want to use a virtual machine or only a different profile.
The portable version is probably the easiest to setup, it should not pose difficulties even to inexperienced users.
Portable Firefox
You can download a portable copy of Firefox from Portable Apps. Just install the portable version into a directory on your machine. You will notice that you cannot launch the portable and regular version of Firefox at the same time, which can be a serious problem.
The startup parameter -no-remote makes it possible to run multiple instances of Firefox at the same time. There is however even an easier option for the portable version of the browser. Go to the FirefoxPortable\Other\Source directory and copy the file FirefoxPortable.ini into the root folder. Open the file with a text editor and change the AllowMultipleInstances value to true.
You should now be able to launch Firefox Portable even if the installed version of the browser is already running.
You can now install add-ons and themes, modify settings and do other modifications that do not affect your default Firefox profile and installation.
The portable version has one disadvantage that needs to be mentioned. Everything that you change in the portable version remains, which means that you could run into a situation that you cannot recover the browser from. You could re-install the portable version, or keep a backup copy at hand to resolve the situation.
One Firefox, Two Profiles
The -no-remote parameter can be used to run multiple profiles that use the same Firefox core at the same time. Two steps are needed to complete the setup.
1. Creating a profile
You obviously need to have two profiles to run them at the same time. For that, you can use the new Profile Manager.
Just select New to create a new Firefox profile and link it to the right version of the browser. You need to make sure that Start new instance [-no-remote] is selected under Launch Options.
You can start Firefox with the newly created profile directly from the profile manager. It is however not that comfortable to launch the profile manager every time you want to start the second Firefox profile. Here is what you can do to circumvent this.
Create a new Firefox shortcut. Windows users can open the Firefox installation directory in Windows Explorer (C:\Program Files (x86)\Mozilla Firefox\), right-click firefox.exe and select the create shortcut option from the context menu. The shortcut is either placed in the same directory or on newer versions of Windows on the desktop.
Right-click the shortcut and select Properties. Locate the Target line and add the following parameter to it at the end: -P profilename
Replace profilename with the name of the profile. If you are not sure how it is named open the Profile Manager again and take a look.
Click ok to apply the changes. I suggest you rename the shortcut as well to avoid confusion. If you have done everything correctly you should be able to launch a second instance of Firefox on your computer.
This method has the same disadvantage as the portable version environment. Everything that you do remains, which may lead to unrecoverable issues.
You can in theory delete the profile and create a new one, and that would take care of all modifications, but that is probably not the most effective option either.
Virtual Machines, Sandbox
Virtual machines or sandboxing is the third option. This is usually more complicated to setup but has the advantage that changes are only temporary. You can use free programs like VMWare, Microsoft's Virtual PC or the excellent Sandboxie.
You could use a Firefox browser appliance for VMware. Please note though that you need to update the browser as it uses an old version of Firefox (Firefox 8 at the time of writing).
To use it, you first need to install VMware on your computer. To run the browser application do the following:
In the VMware Player dialog box, browse for Virtual Machine Configuration File, browse to the directory where you installed the Browser Appliance, select the file Browser-Appliance.vmx, and click Open.
Closing Words
Users who test a lot benefit from setting up a test environments. This opens up lots of possibilities. You could run a cutting edge test environment, e.g. with the latest nightly versions of the browser to test your web pages and applications against it, or the same version as your standard profile is using.
Are you making use of different profiles in the browser? And if you are, for what purpose? Let me know in the comments.
How would you test some of these add-ons to see if they’re phoning home or compiling data on you? any ideas?
You could use a network monitoring software, https://www.ghacks.net/tag/network-monitoring/
“You should now be able to launch Firefox Portable even if the installed version of the browser is already running.” No, you *cannot* run Firefox Portable while any other copy of the browser is running (even another Firefox Portable install). This is because the PortableApps applications copy existing registry entries into a temporary file, load registry entries pointing to the portable app, then undo all changes when the portable application closes.
If another copy of Firefox is running, the portable launcher will detect it and ask you to close it, as changes to the Windows Registry would cross and corrupt each other.
Doc, I was able to run the portable version and the installed version side by side using the described method.
Thank you for this article, Martin.
SFdude
On Christmas eve, I got brave and decided to test Firefox UX, fully aware that it’s a Nightly build!
It installed in it’s own folder (UX), apart from Firefox 9.01 and to my amazement, UX has been running just fine, since!!
No bugs that I have found, No crashes., the Browser is fast, smooth, the pages render amazingly fast and my browsing experience has been as such that I deleted Firefox 9.01 and am sticking with UX!!
There are some noticeable improvements in UX, to include a new Download Manager and improved GUI.
All Add ons are fully compatible, except for the KIS features that Kaspersky Labs needs to update and I am very impressed with what Mozilla has released!
No real need for the Profile Manager, as I’m the only one using my PC and I only need one version of Firefox.
I heard about that release but have not tried it yet.
The Profile Manager seems to be a very good solution on it’s own for running multiple instances of Firefox and using a clean, temporary profile when doing so.
My question is: why don’t Mozilla promote the Profile Manager more? I don’t think I knew about it until I saw an article on it here on ghacks. This despite me reading Planet Mozilla daily.
I run multiple, simultaneous instances of Nightly, Nightly UX, Aurora, Beta and release versions for…
testing add-ons across versions
to discover and learn future features and additions and support for new/proposed technology
to help with testing, provide feedback, file bugs, etc
for the fun of it sometimes
and of course for everyday browsing.
My primary profile is pretty heavy with usually 45-50 add-ons, personal tweaks, and customizations and so on.
It’s my Swiss Army knife.
I also have clean/empty profiles for various purposes (they load pretty much instantly and are faster without add-ons), and some profiles are specifically for media and entertainment with specific add-ons.
I prefer just adding the -no-remote switch over the Profile Manager you referred to because the profile manager automatically sorts my profiles alphabetically (not sure if I can change that) and I like them to be in a certain order so I edit the profiles.ini to do so.
I suppose when the default profile manager is removed, I won’t have much of a choice.
Great post Martin.