This repository contains tests for Firefox Stub Attribution - A service which accepts an attribution code and returns a modified stub installer.
We love working with contributors to improve test coverage on our projects, but it does require a few skills. By contributing to our test suite you will have an opportunity to learn and/or improve your skills with Python, Selenium WebDriver, GitHub, virtual environments, the Page Object Model, and more.
Our new contributor guide should help you to get started, and will also point you in the right direction if you need to ask questions.
This suite of tests uses a real browser (Google Chrome) on Windows 10, with real end-user actions, and gets us all the way up to, but not including downloading/running/verifying the stub-installer build.
If you have cloned this project already, then you can skip this; otherwise you'll need to clone this repo using Git. If you do not know how to clone a GitHub repository, check out this help page from GitHub.
If you think you would like to contribute to the tests by writing or maintaining them in the future, it would be a good idea to create a fork of this repository first, and then clone that. GitHub also has great instructions for forking a repository.
You will need a Sauce Labs account, with a .saucelabs
file in your home
directory containing your username and API key, as follows:
[credentials]
username = username
key = secret
Then you can run the tests using Docker. The --mount
argument is
important, as it allows your .saucelabs
file to be accessed by the Docker container:
$ docker build -t stubattribution-tests .
$ docker run -it --mount type=bind,source=$HOME/.saucelabs,destination=/src/.saucelabs,readonly stubattribution-tests
Whilst we recommend using Sauce Labs to run the tests, it's also possible to run them locally if you have Windows 10, Google Chrome, and chromedriver.
Install Pipenv, and then run the following command:
$ pipenv run pytest
If you want to get involved and add more tests, then there are just a few things we'd like to ask you to do:
- Follow our simple style guide.
- Fork this project with your own GitHub account.
- Make sure all tests are passing, and submit a pull request.
- Always feel free to reach out to us and ask questions.
The current test plan can be found on the Mozilla wiki. Test suites that require manual execution are stored in our Testrail instance.