pytest-sosu 0.3.0
pip install pytest-sosu==0.3.0
Newer version available (0.3.1)
Released:
Unofficial PyTest plugin for Sauce Labs
Navigation
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: MIT License (MIT License Copyright (c) 2020 Andrzej Pragacz Permission is hereby granted, free of charge, to an...)
- Author: Andrzej Pragacz
- Tags pytest , selenium , webdriver , saucelabs , sauce , sosu
- Requires: Python >=3.7
Classifiers
- Development Status
- Framework
- Intended Audience
- License
- Operating System
- Programming Language
- Topic
Project description
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_webdriver
@pytest.fixture
def driver(sosu_selenium_webdriver):
yield sosu_selenium_webdriver
Project details
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: MIT License (MIT License Copyright (c) 2020 Andrzej Pragacz Permission is hereby granted, free of charge, to an...)
- Author: Andrzej Pragacz
- Tags pytest , selenium , webdriver , saucelabs , sauce , sosu
- Requires: Python >=3.7
Classifiers
- Development Status
- Framework
- Intended Audience
- License
- Operating System
- Programming Language
- Topic
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pytest-sosu-0.3.0.tar.gz
.
File metadata
- Download URL: pytest-sosu-0.3.0.tar.gz
- Upload date:
- Size: 13.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
b78fdcd259f82c081e2e355a5f655544ace7d0502a75f7a1cfe4ac59643368fd
|
|
MD5 |
1f44fa641fbeba9272ffab192434a887
|
|
BLAKE2b-256 |
8c1dfb7cd577abdca52ad4ce9fc723b596865570aac2419279103365a1c5838d
|
File details
Details for the file pytest_sosu-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: pytest_sosu-0.3.0-py3-none-any.whl
- Upload date:
- Size: 15.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
88b08bbe75c0f34f3cb6b655bd75a00392fa707f581495f4cc220b6f09c411ab
|
|
MD5 |
f15ca06712b2dcdf43871e62b9bf1384
|
|
BLAKE2b-256 |
461c61ab19c88647838f84ab80487dd932b89a296d6549f082e3dd1c378604be
|