Skip to main content

Firefox browser CLI test setup tool

Project description

Build Status

Summary

ff-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):

Our 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.

Features

  1. DownloadFirefox desktop versions (Nightly, Developer Edition, Beta, Release)

  2. Manage profiles

  3. Load test preferences

Notes

If 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!

Installation

Pre-requisites

  • Python >= 2.7 and virtualenv (Python 3 not yet supported)

Windows Users

  • ff-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 Cygwin

  • Download and install: Cygwin

  • Right click on: c:\\cygwin64\cygwin.bat

  • Run 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/activate

Cleanup

$ deactivate
$ make clean

Run

When not specified, ff will use defaults

Help

$ ff -h

Launch browser, clean profile

  • version: Nightly

  • profile_name:

$ ff
  • version: Developer Edition (aurora)

  • profile_name:

$ ff -c aurora

Launch browser, clean profile, specify profile name

  • version: Nightly

  • profile_name: my_cool_profile1

NOTE: If the specified profile exists, we use it, if not we create a new one with that name.

$ ff -p my_cool_profile1

Custom Browser Prefs

Firefox provides the ability for a user to change preferences in about: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_value

Cloud Services (only)

Launch browser, clean profile, specify services-specific options…

  • version: Beta

  • profile_name: my_cool_profile1

  • product: loop-server

  • environment: stage

  • test-type: e2e-test

NOTE: 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ff-tool-0.0.8.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ff_tool-0.0.8-py2.7.egg (28.1 kB view details)

Uploaded Egg

File details

Details for the file ff-tool-0.0.8.tar.gz.

File metadata

  • Download URL: ff-tool-0.0.8.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ff-tool-0.0.8.tar.gz
Algorithm Hash digest
SHA256 e3857ed68f85151e973cada0e93e8e28811dee04df9a090976b332eb77ca93bd
MD5 70015698614f38c01341a20e9145727b
BLAKE2b-256 41f8ffb4fbe2c591362f3ebaca2d3a50a74a0d4358f9b1c5f7533bbf59a821be

See more details on using hashes here.

File details

Details for the file ff_tool-0.0.8-py2.7.egg.

File metadata

  • Download URL: ff_tool-0.0.8-py2.7.egg
  • Upload date:
  • Size: 28.1 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ff_tool-0.0.8-py2.7.egg
Algorithm Hash digest
SHA256 6fa5d411875682f0febfef3a606eb133a82b0261166103158e4c23e12a4e4d8e
MD5 bd8280d7f677db61ed5e6a25b36e6b54
BLAKE2b-256 1f7c4d4cbc07e777c9356038acc9b8a7cb0e35a7c9f80f13666f4fd87f225381

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page