Skip to main content

Unofficial PyTest plugin for Sauce Labs

Project description


Pytest-Sosu (pronounced Sōsu, ソース) is an unofficial Pytest plugin for running tests on Sauce Labs platforms.


You can install pytest-sosu latest version via pip:

pip install pytest-sosu

Basic Usage

Assuming you have SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables set (credentials can be obtained here), you can write a simple test:

def test_visit(sosu_selenium_webdriver):
    driver = sosu_selenium_webdriver
    assert driver.title == "Example Domain"


from pytest_sosu.webdriver import CapabilitiesMatrix, Browser

# running given test on multiple browsers
        browsers=[Browser("chrome"), Browser("firefox")],
def test_visit_many_browsers(driver):
    assert driver.title == "Example Domain"

# when build basename is set, tests running in given pytest session
# have a build assigned
def sosu_build_basename():
    return 'my-project-name'

# alias for sosu_selenium_webdriver
def driver(sosu_selenium_webdriver):
    yield sosu_selenium_webdriver

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

pytest-sosu-0.3.1.tar.gz (14.3 kB view hashes)

Uploaded source

Built Distribution

pytest_sosu-0.3.1-py3-none-any.whl (16.3 kB view hashes)

Uploaded py3

Supported by

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