Metadata-Version: 2.4
Name: tracereports
Version: 0.6.0
Summary: TraceReports client: reports test steps, screenshots and browser network to a TraceReports server. Includes a pytest plugin.
Author: Jose Lopez
License: Apache-2.0
Project-URL: Homepage, https://github.com/josemiguellopez/tracereports
Project-URL: Documentation, https://github.com/josemiguellopez/tracereports/blob/main/docs/en/python.md
Project-URL: Issues, https://github.com/josemiguellopez/tracereports/issues
Keywords: testing,test-reporting,pytest,playwright,selenium,e2e,qa
Classifier: Framework :: Pytest
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Topic :: Software Development :: Testing
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Provides-Extra: pytest
Requires-Dist: pytest>=7; extra == "pytest"
Provides-Extra: playwright
Requires-Dist: playwright>=1.40; extra == "playwright"

# tracereports (Python client)

🌐 **English** · [Español][readme-es]

Client for the [TraceReports][tracereports] server. Standard library only.

```bash
pip install tracereports
pytest --tracereports                     # reports your pytest suite with no code changes
```

- **pytest plugin**: steps, screenshots, network and DOM with pytest-playwright, the browser console,
  and pytest-xdist workers merged into one run. Also a client API for unittest, Selenium or scripts.
- **Selenium (Chrome, Edge)**: create the driver with `selenium_options(options)` and the plugin also sends
  each test's network (Network tab, Lab), console, screenshot and DOM ([Selenium guide][selenium]).
- **Never slows down or breaks your tests**: evidence goes out in the background with retries and
  no duplicates; whatever could not be sent can be saved and resent later.
- **Without a server**: if the server is down or rejects the token, the run is recorded locally;
  `tracereports report <folder>` builds the HTML report and `tracereports push <folder>` uploads it later.
  With `TRACEREPORTS_OFFLINE=both` it also keeps that local copy while sending to the server
  ([local report guide][local-report]).
- **Configuration** from the environment or the project's `.env` (`TRACEREPORTS_URL`, `TRACEREPORTS_TOKEN`,
  `TRACEREPORTS_TIMEOUT`, `TRACEREPORTS_RUN_TIMEOUT`…). A slow server is retried with the same
  `Idempotency-Key` (never a second run); a down one switches to local recording at once.

Full documentation: [docs/en/python.md][python].

Without an installed binary, closing downloads and verifies the v0.2.0 renderer in the user cache; `TRACEREPORTS_BIN_DOWNLOAD=0` supports offline use with an installed or cached binary. See [offline mode][offline].

[tracereports]: https://github.com/josemiguellopez/tracereports
[selenium]: https://github.com/josemiguellopez/tracereports/blob/main/docs/en/selenium.md
[local-report]: https://github.com/josemiguellopez/tracereports/blob/main/docs/en/local-report.md
[python]: https://github.com/josemiguellopez/tracereports/blob/main/docs/en/python.md
[offline]: https://github.com/josemiguellopez/tracereports/blob/main/docs/en/offline.md
[readme-es]: https://github.com/josemiguellopez/tracereports/blob/main/client/python/README.es.md

## Pages for the Inspector

- `TRACEREPORTS_DOM_STEPS=1`: keeps the page of every step of **every** test, also the ones that pass.
- `TRACEREPORTS_DOM_STEPS=on-problem`: only of the ones that fail or have a WARNING (and a comparison
  baseline of the passing ones every 7 days).
- `TRACEREPORTS_DOM_ON=fail,warning` does not limit the above: it only adds the page of each WARNING.
- `TRACEREPORTS_DOM_MODE=html` (optional; default `structure`): also sends the page's HTML and its style
  sheets, so the Inspector draws the real page with its CSS in an isolated iframe.
