Skip to content

webmate-io/webmate-sdk-python-samples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

webmate-sdk-python-samples

Sample project for trying out webmate-sdk against real webmate environments.

Requirements

  • Python 3.9+
  • Access to a webmate project and API token
  • Internet access to webmate API / Selenium endpoints used by the samples

Installation

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-sdk from PyPI

Environment variables

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_EMAIL
  • WEBMATE_TEST_TEMPLATE_NAME
  • WEBMATE_REFERENCE_EXPEDITION_SPEC_WM_TYPE
  • WEBMATE_COMPARISON_EXPEDITION_SPECS_WM_TYPE

Run flags

These flags enable test groups:

  • WEBMATE_RUN_LIVE_SAMPLES=1 for live API tests
  • WEBMATE_RUN_SELENIUM_SAMPLES=1 for selenium sample tests
  • WEBMATE_RUN_APPIUM_SAMPLES=1 for appium sample tests
  • WEBMATE_RUN_EXPERIMENTAL_SPECS=1 for experimental spec tests

Without the respective flag, tests are skipped.

Commands

Run live tests (default sample set):

WEBMATE_RUN_LIVE_SAMPLES=1 .venv/bin/pytest

Run only selenium samples:

WEBMATE_RUN_LIVE_SAMPLES=1 WEBMATE_RUN_SELENIUM_SAMPLES=1 .venv/bin/pytest -m selenium_sample

Run only appium samples:

WEBMATE_RUN_LIVE_SAMPLES=1 WEBMATE_RUN_APPIUM_SAMPLES=1 .venv/bin/pytest -m appium_sample

Run only experimental specs:

WEBMATE_RUN_LIVE_SAMPLES=1 WEBMATE_RUN_EXPERIMENTAL_SPECS=1 .venv/bin/pytest -m experimental_spec

Run everything:

WEBMATE_RUN_LIVE_SAMPLES=1 WEBMATE_RUN_SELENIUM_SAMPLES=1 WEBMATE_RUN_APPIUM_SAMPLES=1 WEBMATE_RUN_EXPERIMENTAL_SPECS=1 .venv/bin/pytest

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages