Skip to main content

A pytest plugin to list worker statistics after a xdist run.

Project description

pytest-xdist-worker-stats

A pytest plugin

Installation

$ pip install pytest-xdist-worker-stats

Usage

All that is needed is to have xdist installed & enabled, and to run tests in multiple workers.

Example output

platform linux -- Python 3.10.11, pytest-7.3.2, pluggy-1.0.0
plugins: xdist-3.3.1, xdist-worker-stats-0.1.0
12 workers [318 items]
............................................................................................................... [ 34%]
............................................................................................................... [ 69%]
................................................................................................                [100%]
================================================= Worker statistics ==================================================
worker gw0  :   11 tests       5.75s runtime
worker gw1  :   10 tests       6.17s runtime
worker gw2  :    8 tests       5.80s runtime
worker gw3  :   21 tests       5.70s runtime
worker gw4  :   16 tests       5.73s runtime
worker gw5  :    9 tests       5.76s runtime
worker gw6  :   12 tests      19.21s runtime
worker gw7  :   48 tests       5.58s runtime
worker gw8  :   17 tests       5.70s runtime
worker gw9  :   78 tests       5.50s runtime
worker gw10 :   41 tests       5.60s runtime
worker gw11 :   47 tests       5.59s runtime
================================================ 318 passed in 26.66s ================================================

Development

Poetry (dependencies) and pre-commit (coding standards) are required for development. Ther are some tests, obviously written in pytest.

$ poetry install
$ pre-commit install
$ pytest tests

Thanks

Many thanks to Denys Korytkin for the article How to get data from pytest-xdist nodes.

Changelog

0.1.0 (Jun 15, 2023)

  • First Release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest_xdist_worker_stats-0.1.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file pytest_xdist_worker_stats-0.1.0.tar.gz.

File metadata

  • Download URL: pytest_xdist_worker_stats-0.1.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.0 CPython/3.10.11 Linux/6.3.6-100.fc37.x86_64

File hashes

Hashes for pytest_xdist_worker_stats-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c9ac1d31377680da096fcdf645174ff6acd9c531e006dbd35ac21112ec3220c2
MD5 6f835cf7bf11ce928ef96ec79f59f1cb
BLAKE2b-256 4f5bcb04389c1091940ca2d71f8b932695cc100b455c746ef9045586810e9638

See more details on using hashes here.

Provenance

File details

Details for the file pytest_xdist_worker_stats-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_xdist_worker_stats-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 14aac00086b3d081d4d6ae4c9938c9de647b7c974320a57e3ecb8d2f2982bb34
MD5 28760485c4dd5eb5fc1966280c8804cf
BLAKE2b-256 c1e570c20a42545058ef7de8bc07b16e617489263a49c6787cbee154ce039d1d

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page