Package: ff-tool
ContentsSummaryFeaturesNotesInstallationRunHelpLaunch browser, clean profileLaunch browser, clean profile, specify profile nameCustom Browser PrefsCloud Services (only)Summaryff-tool is a Python CLI tool we’ve created to facilitate browser testing
of cloud services. It is largely a convenience wrapper we’ve written
around these amazing tools/libraries (see note below):mozdownloadmozprofileOur typical use case is launching various Firefox browser versions with
a fresh profile and loading custom preferences. This tool enables us to
do this quickly with a 1-liner from the CLI.FeaturesDownloadFirefox desktop versions (Nightly, Developer Edition, Beta,
Release)Manage profilesLoad test preferencesNotesIf you plan on creating a tool of your own, please import the above lib
directly in your script(s). This tool was designed for convenience of
our team for testing Cloud Services and not intended to be used as a
library.Profiles are stored in a temp directory by default which can be
overridden. Use caution if you specify your own profile directory as
profile cleanup functions can wipe out all profiles in your specified
directory.NOTE:This tool is work in progress… USE AT YOUR OWN RISK!InstallationPre-requisitesPython >= 2.7 and virtualenv (Python 3 not yet supported)Windows Usersff-tool will work on Windows, but requires quite a bit of setup.Also, installation behavior for the Firefox binary is different than
for other OSes. In particular, ff-tool installs the Firefox binaries
into a “_temp” directory for all OSes (except Windows) to avoid
clobbering your working browser. Unfortunately, the Windows installer
forces installation into C:\Program Files. Since both the release
and Beta versions of Firefox install into the same place, you also
run the risk of installing one over another.Again, use at your own risk!Windows: Installing CygwinDownload and install:CygwinRight click on: c:\\cygwin64\cygwin.batRun as administrator or you will suffer.A number of dependencies must also be installed including: gcc, make,
curl, pycrypto, python2, python-dev, etc.Build$ make build
$ source ./venv/bin/activateCleanup$ deactivate
$ make cleanRunWhen not specified, ff will use defaultsHelp$ ff -hLaunch browser, clean profileversion: Nightlyprofile_name:$ ffversion: Developer Edition (aurora)profile_name:$ ff -c auroraLaunch browser, clean profile, specify profile nameversion: Nightlyprofile_name: my_cool_profile1NOTE:If the specified profile exists, we use it, if not we create a
new one with that name.$ ff -p my_cool_profile1Custom Browser PrefsFirefox provides the ability for a user to change preferences inabout:config. For testing and automation this can be cumbersome as it
usually involves many small steps.As alternative, ff-tool provides a means for loading these prefs from a
root directory you specify via an environment variable.Example:$ export PREFS_ROOT_DIR = '../services-test'Custom prefs must be stored in the following directory/file structure:You must also include a prefs.ini file which specifies the
environment(s) in which each pref set is used.Example prefs.ini:[DEFAULT]
pref_key = pref_value

[dev]
pref_key = pref_value

[stage]
pref_key = pref_valueCloud Services (only)Launch browser, clean profile, specify services-specific options…version: Betaprofile_name: my_cool_profile1product: loop-serverenvironment: stagetest-type: e2e-testNOTE:If the specified profile exists, we use it, if not we create a
new one with that name.$ ff -c beta -p my_cool_profile1 -a loop-server -e stage -t e2e-test