Test web apps with pytest
Project description
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
Project details
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytest_webstage-1.0.0.tar.gz.
File metadata
- Download URL: pytest_webstage-1.0.0.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.6 Linux/6.10.9-200.fc40.x86_64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4165b516dd882ce400c9d3502e6d5fff42f567fc42fa714439228a02089774a
|
|
| MD5 |
36f042f9442bc2a5394f1415bf332ebf
|
|
| BLAKE2b-256 |
a6b11d787d0768cddefd433785333d42f68f44834dcd0302743362b99bf186a7
|
File details
Details for the file pytest_webstage-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pytest_webstage-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.6 Linux/6.10.9-200.fc40.x86_64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e77c0567e589b2e0f46bb6d4970693858c2bd8370d779c09cd99838eb257ea0
|
|
| MD5 |
6eab25706ca1670f56be5d5394d5ca63
|
|
| BLAKE2b-256 |
fee7af6364548eac811c64981eebdde950c4559082ff223bc096b43a7872b895
|