Official Testinel plugin for pytest
Testinel’s pytest plugin captures structured Selenium and Playwright test execution data directly from pytest and sends it to Testinel, where your test results become searchable, comparable, and actually useful. No log scraping. No brittle CI hacks. Just deterministic test analytics.
📦 Getting Started
Prerequisites
You need a Testinel account and project.
Installation
Getting Testinel into your project is straightforward. Just run this command in your terminal:
pip install --upgrade pytest-testinel
Or with uv:
uv add pytest-testinel
Configuration
Set Testinel reporter DSN environment variable TESTINEL_DSN. Get DSN for your project at https://testinel.dev/projects/.
Examples:
# Report to Testinel (HTTPS)
export TESTINEL_DSN="https://your.testinel.endpoint/ingest/xxxxxxxxxxxx/"
# Report to a local file (JSON)
export TESTINEL_DSN="file:///tmp/testinel-results.json"
# Or use a direct file path
export TESTINEL_DSN="./testinel-results.json"
Logging
Testinel uses pytest's standard logging controls.
To set the logging level to INFO for all pytest loggers and show the messages
live, run:
pytest --log-level=INFO --log-cli-level=INFO
To change the level for pytest-testinel only, set its parent logger in your
project's conftest.py:
import logging
def pytest_configure() -> None:
logging.getLogger("pytest_testinel").setLevel(logging.INFO)
To also show these messages live, enable pytest's live logging:
pytest -o log_cli=true
Other loggers keep their existing levels. Replace INFO with DEBUG,
WARNING, or another standard Python logging level as needed.
Use pytest's --log-file, --log-format, and related options to control log
storage and formatting.
Recommended pytest flags
For better debugging and richer failure context, it is highly recommended to run pytest with:
--showlocals --tb=long -vv
Why:
--showlocals: includes local variable values in tracebacks, which makes root-cause analysis much faster.--tb=long: shows full, non-truncated tracebacks so you can see complete failure paths.-vv: increases verbosity, showing more detailed test identifiers and execution output.
Example:
pytest --showlocals --tb=long -vv
Recommended Playwright flags
If you run browser tests with pytest-playwright, these flags provide better artifacts for debugging:
--tracing=retain-on-failure --video=retain-on-failure --screenshot=only-on-failure --output=test-results
Why:
--tracing=retain-on-failure: captures a full Playwright trace for failed tests only.--video=retain-on-failure: keeps video recordings only for failed tests.--screenshot=only-on-failure: saves screenshots at failure time.--output=test-results: stores artifacts in a predictable directory.
Example:
pytest --tracing=retain-on-failure --video=retain-on-failure --screenshot=only-on-failure --output=test-results
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_testinel-0.8.4.tar.gz.
File metadata
- Download URL: pytest_testinel-0.8.4.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9a1ccfb05495c83e127285ee3f52f0f90f44b76cbe0cab0af24b53322d7ada2
|
|
| MD5 |
21409de04e58bf46bc8dae0e5f0f4326
|
|
| BLAKE2b-256 |
984f7c2bd29c0cab9a5de21c8c86b05015d30debd6312a1324b3891aa8f7b6a3
|
File details
Details for the file pytest_testinel-0.8.4-py3-none-any.whl.
File metadata
- Download URL: pytest_testinel-0.8.4-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0e46850822e1ea6c9d322bbec1d9e9560183d1ad5d6509f37d8e3f5c1f2df03
|
|
| MD5 |
20d81b4bfe925fef08282443c970c149
|
|
| BLAKE2b-256 |
b057c7daa73aa726783cc6f21a047bc98a0fc587b252f06557da0be9e259ae12
|