Bouncer Tests for download.allizom.org
Getting involved as a contributor
We love working with contributors to fill out the test coverage for Bouncer Tests, but it does require a few skills. You will need to know some Python and you will need some basic familiarity with GitHub.
If you need to brush up on programming but are eager to start contributing immediately, please consider helping us find bugs in Mozilla Firefox or find bugs in the Mozilla websites tested by the Web QA team.
To brush up on Python skills before engaging with us, Dive Into Python is an excellent resource. MIT also has lecture notes on Python available through their open courseware. The programming concepts you will need to know include functions, working with classes, and some object oriented programming basics.
Questions are always welcome
While we take pains to keep our documentation updated, the best source of information is those of us who work on the project. Don't be afraid to join us in irc.mozilla.org #mozwebqa to ask questions about Bouncer Tests. Mozilla also hosts the #mozillians chat room to answer your general questions about contributing to Mozilla.
How to set up and build Bouncer tests locally
This repository contains tests suite used to test Mozilla's Bouncer. Mozilla maintains a guide to run automated tests on our QMO website.
You will need to install the following:
- Git: If you have cloned this project already then you can skip this! GitHub has excellent guides for Windows, OS X and Linux.
- Python: Before you will be able to run these tests you will need to have Python 2.6 installed.
pip (for managing Python packages)
sudo easy_install pip
If you are using
virtualenv, run the following in the project root:
virtualenv venv source venv/bin/activate pip install -r requirements.txt
If you are not using
virtualenv, run the following in the project root to install dependencies globally:
sudo pip install -r requirements.txt
For more information on
virtualenv, see below.
Running tests locally
To run these tests, use:
py.test --baseurl="http://download.allizom.org" tests
-k to run a specific test. For example,
py.test -k test_that_checks_redirect_using_incorrect_query_values \ --baseurl="http://download.allizom.org" tests
The mozwebqa plugin has advanced command line options for reporting and using browsers. To see the options available, try running:
Also see the documentation on davehunt's pytest-mozwebqa GitHub project page.
virtualenvwrapper (optional, intermediate level)
While most of us have had some experience using virtual machines,
virtualenv is something else entirely. It's used to keep libraries that you install from clashing and messing up your local environment. After installing
virtualenvwrapper will give you some nice commands to use with
Moz-Grid-Config (optional, intermediate level)
Moz-Grid-Config is a project containing our Selenium Grid configuration. It uses Apache Ant to run the Selenium hub or node to the configuration defined in the yaml files.
We recommend git cloning the repository for a couple of reasons:
- The commands to launch a node or hub are all pre-configured and as simple as typing
- The paths to browser binaries and nodes can be stored in configuration (yaml) files
- It contains a jar file of the latest Selenium in it's lib directory
(If you prefer to download Selenium it's own, you can do that from here)
You will need to make sure that the name of your Firefox application matches one of the names in
moz-grid-config/grid_configuration.yml. As an example: even though Firefox typically installs without a version number in the name,
moz-grid-config requires it to be named
Firefox <version number>.app on OS X.
If you want to get involved and add more tests then there's just a few things we'd like to ask you to do:
- Use an existing file from this repository as a template for all new tests and page objects
- Follow our simple style guide
- Fork this project with your own GitHub account
- Add your test into the
testsfolder and the necessary methods for it into the appropriate file in
- Make sure all tests are passing and submit a pull request with your changes
This software is licensed under the MPL 2.0:
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.