Skip to main content

pytest-webstage

Test web apps with pytest.

  • Automatic parametrized testing for different browsers
  • Managing driver and browsers for testing
  • Sync and async API

Getting started

Install pytest and pytest-webstage.

# for pip:
pip install pytest-webstage

# for poetry:
poetry add --group dev pytest-webstage

It's recommended to use webstage.toml for the configuration.

webstage init > webstage.toml

Write your test in pytest:

# tests/test_browser.py
from pytest_webstage.webstage import WebStage

def test_can_visit_url(webstage: WebStage):
    with webstage.step("Visit Google") as step:
        step.sync.go("https://google.com")
        step.sync.until_ready()

Execute the test:

pytest

If you'd like to check the web drivers and the browsers used:

webstage check-cache

You can see some examples at tests/.

License

SPDX: Apache-2.0

Release files for pytest-webstage 1.0.0

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-webstage 1.0.0
File Size Uploaded
pytest_webstage-1.0.0.tar.gz 6.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytest-webstage 1.0.0
File Interpreter ABI Platform
pytest_webstage-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 13.9 kB

Release files / pytest_webstage-1.0.0.tar.gz

Download URL pytest_webstage-1.0.0.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b4165b516dd882ce400c9d3502e6d5fff42f567fc42fa714439228a02089774a
BLAKE2b-256 checksum
How to use checksums
a6b11d787d0768cddefd433785333d42f68f44834dcd0302743362b99bf186a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.12.6 Linux/6.10.9-200.fc40.x86_64

Release files / pytest_webstage-1.0.0-py3-none-any.whl

Download URL pytest_webstage-1.0.0-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5e77c0567e589b2e0f46bb6d4970693858c2bd8370d779c09cd99838eb257ea0
BLAKE2b-256 checksum
How to use checksums
fee7af6364548eac811c64981eebdde950c4559082ff223bc096b43a7872b895
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.12.6 Linux/6.10.9-200.fc40.x86_64

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

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