Local web UI for running and monitoring pytest suites
Project description
pytest-web
A lightweight local web UI for discovering, selecting, and running pytest suites — with real-time pass/fail status, filtering, env-var injection, and on-demand Allure reports.
Install
pip install pytest-web
Must be installed in the same Python environment as your project's pytest.
Quick start
cd your-project
pytest-web
Opens http://127.0.0.1:8000 in your browser automatically.
CLI flags
| Flag | Default | Description |
|---|---|---|
--port |
8000 |
Port to listen on |
--host |
127.0.0.1 |
Bind host |
--cwd |
current dir | Project root (where pytest.ini lives) |
--no-browser |
— | Skip auto-opening the browser |
Features
Fetch & select tests
Click Fetch Tests (or press Enter in the path/args box) to collect all tests via pytest --collect-only. Tests are grouped by file. You can:
- Check/uncheck individual tests or entire files
- Use Select All to toggle only what's currently visible
- Type in the filter box to search by test name
- Click any counter (passed / failed / skipped) to filter to that status — click again to clear
Run controls
- Workers — number of parallel workers (
-n). Overrides any-ninpytest.ini addopts. - ▶ Run Selected — runs only checked tests that are currently visible
- ■ Cancel — terminates the pytest process and all xdist workers cleanly
Param builder
Use the dropdown to add common pytest flags (-k, -m, --tb, -x, --maxfail, etc.) to the args bar without typing. Project-specific options from your conftest.py or installed plugins (e.g. --browser, --headed) are auto-detected and added to the dropdown.
Env vars
Inject environment variables for the test run. Type NAME=value in the Name field and it auto-splits on blur. Variables are saved to localStorage and restored on reload.
Live status
While tests run, each row shows a pulsing dot (running) that turns green/red/yellow on completion. The counters update in real time and accumulate across runs — so if you run a subset, the results from tests not in that run are preserved in the counters.
Output log
Pytest's stdout/stderr streams in a collapsible panel at the bottom. Opens automatically if stderr has output (e.g. failures). Shows all xdist worker output.
Command preview
The $ pytest ... command preview updates as you change selections, args, or workers. Click ⎘ to copy it.
Allure report (on demand)
If you use Allure for test reporting, pytest-web can generate and serve the Allure report with history tracking built in.
Requirements
Install the Allure CLI globally (separate from the Python package):
# macOS
brew install allure
# Linux — download from https://github.com/allure-framework/allure2/releases
# and place the `allure` binary on your PATH
Setup
Your project should have --alluredir in pytest.ini (or pyproject.toml):
# pytest.ini
[pytest]
addopts = --alluredir=test/allure-results --clean-alluredir
pytest-web auto-detects this path. You can also enter or override it manually in the Allure bar at the bottom of the page.
Usage
- Run your tests (they populate the results directory)
- Click Open Report in the Allure bar
- The report is generated and served — your browser opens automatically
- The URL is shown as a link in case the browser doesn't open
Click Stop to shut down the Allure server.
History / trends
Every time you click Open Report, pytest-web copies the history from the previous report back into the results directory before regenerating. This means Allure's trend graphs and history tabs work automatically — no manual setup required.
The report is written to allure-report/ next to your results directory (e.g. if results are in test/allure-results, the report is at test/allure-report).
Note: The Allure server is completely independent of the test runner. You can run tests while the Allure server is up, and vice versa.
How it works
- Discover —
pytest --collect-only -p pytest_web.pluginwrites collected node IDs to a temp file and returns them to the UI. - Run —
pytest <selected-ids> -n <workers> -p pytest_web.pluginis launched as a subprocess. The plugin fires HTTP webhooks back to the FastAPI server at each test start/end. - Stream — the server broadcasts those events over WebSocket to all connected browser tabs. The UI updates each row's status dot and counters in real time.
- Allure —
allure generatebuilds the HTML report (with history), thenallure openserves it on a separate port.
Your pytest.ini, conftest.py, fixtures, and plugins are all used normally — pytest-web just wraps the command.
Compatibility
- Python 3.9 – 3.13
- pytest 7+
- pytest-xdist 3+ (installed automatically as a dependency)
- Works with any pytest plugin (playwright, django, anyio, etc.)
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_web-0.1.9.tar.gz.
File metadata
- Download URL: pytest_web-0.1.9.tar.gz
- Upload date:
- Size: 32.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4eebe96267ac3788c7ed902de4593e288971ed57390f23972b47d0e38c01fa6e
|
|
| MD5 |
547801d1f00e5c56cbce640122de742d
|
|
| BLAKE2b-256 |
2696523986b316b7984fd934d844365a7afa371009f16f4729cd8c1ae9335e37
|
Provenance
The following attestation bundles were made for pytest_web-0.1.9.tar.gz:
Publisher:
publish.yml on usamaJ17/pytest-web
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytest_web-0.1.9.tar.gz -
Subject digest:
4eebe96267ac3788c7ed902de4593e288971ed57390f23972b47d0e38c01fa6e - Sigstore transparency entry: 1433886734
- Sigstore integration time:
-
Permalink:
usamaJ17/pytest-web@7d313e9ad5e3502690f8dfa3a9848dd2bba6f194 -
Branch / Tag:
refs/tags/v0.1.9 - Owner: https://github.com/usamaJ17
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7d313e9ad5e3502690f8dfa3a9848dd2bba6f194 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pytest_web-0.1.9-py3-none-any.whl.
File metadata
- Download URL: pytest_web-0.1.9-py3-none-any.whl
- Upload date:
- Size: 31.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
866c2bf78331d77f9e06250c813f8d4a27e9e01bf9e058ac2080109562920918
|
|
| MD5 |
448856950f35cceaf9c4d2a02c43fab8
|
|
| BLAKE2b-256 |
246f617db6361df2dffe8fdb957f6f7a2d3b46909ce861a21079be1f883284b2
|
Provenance
The following attestation bundles were made for pytest_web-0.1.9-py3-none-any.whl:
Publisher:
publish.yml on usamaJ17/pytest-web
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytest_web-0.1.9-py3-none-any.whl -
Subject digest:
866c2bf78331d77f9e06250c813f8d4a27e9e01bf9e058ac2080109562920918 - Sigstore transparency entry: 1433886891
- Sigstore integration time:
-
Permalink:
usamaJ17/pytest-web@7d313e9ad5e3502690f8dfa3a9848dd2bba6f194 -
Branch / Tag:
refs/tags/v0.1.9 - Owner: https://github.com/usamaJ17
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7d313e9ad5e3502690f8dfa3a9848dd2bba6f194 -
Trigger Event:
push
-
Statement type: