Skip to main content

Pytest-Sosu

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

Installation

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
    driver.get("http://example.com/")
    assert driver.title == "Example Domain"

Examples

from pytest_sosu.webdriver import CapabilitiesMatrix, Browser


# running given test on multiple browsers
@pytest.mark.sosu(
    capabilities_matrix=CapabilitiesMatrix(
        browsers=[Browser("chrome"), Browser("firefox")],
    ),
)
def test_visit_many_browsers(driver):
    driver.get("http://example.com/")
    assert driver.title == "Example Domain"

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


# alias for sosu_selenium_webdriver
@pytest.fixture
def driver(sosu_selenium_webdriver):
    yield sosu_selenium_webdriver

Metadata

Release files for pytest-sosu 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytest-sosu 0.3.1
File Size Uploaded Provenance Actions
pytest-sosu-0.3.1.tar.gz 14.3 kB Without provenance Details for pytest-sosu-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pytest-sosu 0.3.1
File Interpreter ABI Platform Actions
pytest_sosu-0.3.1-py3-none-any.whl Python 3 none any Details for pytest_sosu-0.3.1-py3-none-any.whl

Total release size: 30.6 kB

Release files / pytest-sosu-0.3.1.tar.gz

Download URL pytest-sosu-0.3.1.tar.gz
Size 14.3 kB
Tags Source
SHA-256 checksum
How to use checksums
23b1a1d21fefdc6466f0159467470a2ff55e343358ac47d8bc4fc6b4daedd86d
BLAKE2b-256 checksum
How to use checksums
dfdb48b2bc68857d0971d1ed80ce26b4f04c4592f205bbb39feff70ba513bf17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.5

Release files / pytest_sosu-0.3.1-py3-none-any.whl

Download URL pytest_sosu-0.3.1-py3-none-any.whl
Size 16.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a39cf6169266e65a65fa4d87f89b68cd22596e8df43b0a21cedee254b0638eb7
BLAKE2b-256 checksum
How to use checksums
c1cea09bd4e4623c443d2786b649dd06f0d436efe93dc22969ad119a4ef6d2a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.5

Security for pytest-sosu 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page