Sample project for trying out webmate-sdk against real webmate environments.
- Python 3.9+
- Access to a webmate project and API token
- Internet access to webmate API / Selenium endpoints used by the samples
From the repository root:
python -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install .What this does:
- Installs dependencies from this project
- Automatically installs
webmate-sdkfrom PyPI
Required:
export WEBMATE_API_TOKEN="..."
export WEBMATE_PROJECT_ID="..."Optional:
export WEBMATE_API_BASE_URL="https://app.webmate.io/api/v1/"
export WEBMATE_SELENIUM_URL="https://selenium.webmate.io/wd/hub"
export WEBMATE_SELENIUM_BROWSER="chrome"
export WEBMATE_SELENIUM_PLATFORM="WINDOWS_11_64"Only if custom tenant mapping is required:
WEBMATE_EMAILWEBMATE_TEST_TEMPLATE_NAMEWEBMATE_REFERENCE_EXPEDITION_SPEC_WM_TYPEWEBMATE_COMPARISON_EXPEDITION_SPECS_WM_TYPE
These flags enable test groups:
WEBMATE_RUN_LIVE_SAMPLES=1for live API testsWEBMATE_RUN_SELENIUM_SAMPLES=1for selenium sample testsWEBMATE_RUN_APPIUM_SAMPLES=1for appium sample testsWEBMATE_RUN_EXPERIMENTAL_SPECS=1for experimental spec tests
Without the respective flag, tests are skipped.
Run live tests (default sample set):
WEBMATE_RUN_LIVE_SAMPLES=1 .venv/bin/pytestRun only selenium samples:
WEBMATE_RUN_LIVE_SAMPLES=1 WEBMATE_RUN_SELENIUM_SAMPLES=1 .venv/bin/pytest -m selenium_sampleRun only appium samples:
WEBMATE_RUN_LIVE_SAMPLES=1 WEBMATE_RUN_APPIUM_SAMPLES=1 .venv/bin/pytest -m appium_sampleRun only experimental specs:
WEBMATE_RUN_LIVE_SAMPLES=1 WEBMATE_RUN_EXPERIMENTAL_SPECS=1 .venv/bin/pytest -m experimental_specRun everything:
WEBMATE_RUN_LIVE_SAMPLES=1 WEBMATE_RUN_SELENIUM_SAMPLES=1 WEBMATE_RUN_APPIUM_SAMPLES=1 WEBMATE_RUN_EXPERIMENTAL_SPECS=1 .venv/bin/pytest