Skip to content

pyup-bot/stubattribution-tests

 
 

Repository files navigation

Tests for Stub Attribution

This repository contains tests for Firefox Stub Attribution - A service which accepts an attribution code and returns a modified stub installer.

license travis updates Python 3

Table of contents:

Getting involved

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.

How to run the tests

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.

Clone the repository

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.

Run the tests using Sauce Labs

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

Run the tests using Google Chrome on Windows

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

Writing tests

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:

  1. Follow our simple style guide.
  2. Fork this project with your own GitHub account.
  3. Make sure all tests are passing, and submit a pull request.
  4. Always feel free to reach out to us and ask questions.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 96.6%
  • Dockerfile 3.4%