End of Life
The Affilates project is in the process of being end-of-lifed. By the end of the year the project will be shut down. There is still active discussion as to if existing banner image HTML snippets will continue to work. More information will be provided as the community discusses the project shutdown sequence.
In the mean time, we currently have no plans to create new end-to-end test cases for this project. As features are slowly removed help will be needed removing the effected test cases.
For example, in the near future the ability to create new Affliates accounts and new banners will be removed. As this occurs git issues will be filed.
Read more here for more information or to contact the team with question, thoughts, or concerns.
Thank you for checking out Mozilla's Affiliates-Tests test suite. Mozilla and the Web QA team are grateful for the help and hard work of many contributors like yourself. The following contributors have submitted pull requests to Affiliates-Tests:
Getting involved as a contributor
We love working with contributors to fill out the Selenium test coverage for Affiliates-Tests, but it does require a few skills. You will need to know some Python, some Selenium and a basic familiarity with GitHub.
If you know some Python, it's worth having a look at the Selenium framework to understand the basic concepts of browser based testing and especially page objects. Our suite uses Selenium WebDriver.
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 WebQA 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 OpenCourseWare. 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 our Selenium tests. Mozilla also hosts the #affiliates chat room to answer your general questions about contributing to Mozilla.
Getting set up
It's easy to get set up to run the test suite. Install the following software to your development environment and you'll be up and running in no time.
If you don't have Git on your computer, download and install it. I you already have Git, you can skip this step.
If you don't already have it installed, please install Python 2.6+, because you will need it for running tests.
Cloning the test repository with Git
After you have installed Git you will need to clone the project to your hard drive. From your workspace directory run this command which will copy (clone) the project to your hard drive
git clone --recursive git://github.com/mozilla/Affiliates-Tests.git
Installing Python packages
You will need to install Selenium, py.test, unittestzero and some other project specific packages. Fortunately
pip makes it easy to install all of these in one step. Let's start by installing pip:
sudo easy_install pip
Now using pip we'll install the packages we need (which are listed in requirements.txt)
pip install -Ur requirements.txt
If you are running on Ubuntu/Debian you will need to do following first:
sudo apt-get install python-setuptools
to install the required Python libraries.
Running tests locally
To run tests locally it's a simple case of calling
py.test from the Affiliates-Tests directory.
For more command-line options see the pytest-mozwebqa documentation
Virtual Environments (Optional/Intermediate level)
The step above installs the packages globally on your operating system. Using
virtualenv you can sandbox Python packages into virtual environments for each Mozilla project you work on. Follow our Virtual Env guide to get a virtual environment up and running. We recommend this practice.
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 the template files 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 "tests" folder and the necessary methods for it into the appropriate file in "pages"
- 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/.