pytest-xdist-worker-stats


Namepytest-xdist-worker-stats JSON
Version 0.2.0 PyPI version JSON
download
home_pagehttps://github.com/mikicz/pytest-xdist-worker-stats
SummaryA pytest plugin to list worker statistics after a xdist run.
upload_time2024-04-16 21:36:45
maintainerNone
docs_urlNone
authorMikuláš Poul
requires_python>=3.8
licenseMIT
keywords pytest xdist pytest-xdist
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pytest-xdist-worker-stats

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

## Installation

```shell
$ pip install pytest-xdist-worker-stats
```

## Usage

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

### Default mode

```shell
pytest {all_your_options}
```

```text
============================= test session starts ==============================
platform linux -- Python 3.10.7, pytest-8.1.1, pluggy-1.4.0
plugins: xdist-worker-stats-0.2.0, xdist-3.5.0
created: 2/2 workers
2 workers [4 items]

....                                                                     [100%]
============================== Worker statistics ===============================
worker gw0  :    2 tests       0.00s runtime
worker gw1  :    2 tests       0.00s runtime

Tests   : min        2, max        2, average 2.0
Runtime : min    0.00s, max    0.00s, average 0.00s
============================== 4 passed in 1.82s ===============================
```

### Summary mode

```shell
pytest {all_your_options} --no-xdist-runtimes
```

```text
============================= test session starts ==============================
platform linux -- Python 3.10.7, pytest-8.1.1, pluggy-1.4.0
plugins: xdist-worker-stats-0.2.0, xdist-3.5.0
created: 2/2 workers
2 workers [4 items]

....                                                                     [100%]
============================== Worker statistics ===============================
Tests   : min        2, max        2, average 2.0
Runtime : min    0.00s, max    0.00s, average 0.00s
============================== 4 passed in 1.82s ===============================
```

### Breakdown mode

```shell
pytest {all_your_options} --xdist-breakdown
```

```text
============================= test session starts ==============================
platform linux -- Python 3.10.7, pytest-8.1.1, pluggy-1.4.0
plugins: xdist-worker-stats-0.2.0, xdist-3.5.0
created: 2/2 workers
2 workers [4 items]

....                                                                     [100%]
============================== Worker statistics ===============================
worker gw0  :    2 tests       0.00s runtime
    test_plugin.py::test_bar[1]
    test_plugin.py::test_foo
worker gw1  :    2 tests       0.00s runtime
    test_plugin.py::test_bar[2]
    test_plugin.py::test_bar[3]

Tests   : min        2, max        2, average 2.0
Runtime : min    0.00s, max    0.00s, average 0.00s
============================== 4 passed in 1.82s ===============================
```

## Development

[Poetry](https://python-poetry.org/) (dependencies) and [pre-commit](https://pre-commit.com/) (coding standards) are required for development.

```shell
$ poetry install
$ pre-commit install
```

## Thanks

Many thanks to [Denys Korytkin](https://github.com/DKorytkin) for the article [How to get data from pytest-xdist nodes](https://korytkin.medium.com/how-to-get-data-from-pytest-xdist-nodes-2fbf2f0fe957).

## Changelog

### 0.1.4 (Aug 8, 2023)

* Summarize statistics

### 0.1.3 (Aug 8, 2023)

* Add CI

### 0.1.2 (Jun 19, 2023)

* Fix several issues

### 0.1.1 (Jun 15, 2023)

* First Release


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/mikicz/pytest-xdist-worker-stats",
    "name": "pytest-xdist-worker-stats",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "pytest, xdist, pytest-xdist",
    "author": "Mikul\u00e1\u0161 Poul",
    "author_email": "mikulaspoul@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/ad/e4/97d497d1e0a031d6688bff6d49ab5afa464bf835f0c7c0c0ba037bbe6b14/pytest_xdist_worker_stats-0.2.0.tar.gz",
    "platform": null,
    "description": "# pytest-xdist-worker-stats\n\nA pytest plugin to list worker statistics after a xdist run.\n\n## Installation\n\n```shell\n$ pip install pytest-xdist-worker-stats\n```\n\n## Usage\n\nAll that is needed is to have xdist installed & enabled, and to run tests in multiple workers.\n\n### Default mode\n\n```shell\npytest {all_your_options}\n```\n\n```text\n============================= test session starts ==============================\nplatform linux -- Python 3.10.7, pytest-8.1.1, pluggy-1.4.0\nplugins: xdist-worker-stats-0.2.0, xdist-3.5.0\ncreated: 2/2 workers\n2 workers [4 items]\n\n....                                                                     [100%]\n============================== Worker statistics ===============================\nworker gw0  :    2 tests       0.00s runtime\nworker gw1  :    2 tests       0.00s runtime\n\nTests   : min        2, max        2, average 2.0\nRuntime : min    0.00s, max    0.00s, average 0.00s\n============================== 4 passed in 1.82s ===============================\n```\n\n### Summary mode\n\n```shell\npytest {all_your_options} --no-xdist-runtimes\n```\n\n```text\n============================= test session starts ==============================\nplatform linux -- Python 3.10.7, pytest-8.1.1, pluggy-1.4.0\nplugins: xdist-worker-stats-0.2.0, xdist-3.5.0\ncreated: 2/2 workers\n2 workers [4 items]\n\n....                                                                     [100%]\n============================== Worker statistics ===============================\nTests   : min        2, max        2, average 2.0\nRuntime : min    0.00s, max    0.00s, average 0.00s\n============================== 4 passed in 1.82s ===============================\n```\n\n### Breakdown mode\n\n```shell\npytest {all_your_options} --xdist-breakdown\n```\n\n```text\n============================= test session starts ==============================\nplatform linux -- Python 3.10.7, pytest-8.1.1, pluggy-1.4.0\nplugins: xdist-worker-stats-0.2.0, xdist-3.5.0\ncreated: 2/2 workers\n2 workers [4 items]\n\n....                                                                     [100%]\n============================== Worker statistics ===============================\nworker gw0  :    2 tests       0.00s runtime\n    test_plugin.py::test_bar[1]\n    test_plugin.py::test_foo\nworker gw1  :    2 tests       0.00s runtime\n    test_plugin.py::test_bar[2]\n    test_plugin.py::test_bar[3]\n\nTests   : min        2, max        2, average 2.0\nRuntime : min    0.00s, max    0.00s, average 0.00s\n============================== 4 passed in 1.82s ===============================\n```\n\n## Development\n\n[Poetry](https://python-poetry.org/) (dependencies) and [pre-commit](https://pre-commit.com/) (coding standards) are required for development.\n\n```shell\n$ poetry install\n$ pre-commit install\n```\n\n## Thanks\n\nMany thanks to [Denys Korytkin](https://github.com/DKorytkin) for the article [How to get data from pytest-xdist nodes](https://korytkin.medium.com/how-to-get-data-from-pytest-xdist-nodes-2fbf2f0fe957).\n\n## Changelog\n\n### 0.1.4 (Aug 8, 2023)\n\n* Summarize statistics\n\n### 0.1.3 (Aug 8, 2023)\n\n* Add CI\n\n### 0.1.2 (Jun 19, 2023)\n\n* Fix several issues\n\n### 0.1.1 (Jun 15, 2023)\n\n* First Release\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A pytest plugin to list worker statistics after a xdist run.",
    "version": "0.2.0",
    "project_urls": {
        "Homepage": "https://github.com/mikicz/pytest-xdist-worker-stats",
        "Repository": "https://github.com/mikicz/pytest-xdist-worker-stats"
    },
    "split_keywords": [
        "pytest",
        " xdist",
        " pytest-xdist"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d64e7214268ac2e50728129126d7ea99cbd750f25f288d4ab2e31e38582bc674",
                "md5": "a9cbeb1f79103c61c63084fcd72dd5f1",
                "sha256": "8a6f9946be32000372f2117225fec34a34ce8d8ff4aa026f68d03f0880800909"
            },
            "downloads": -1,
            "filename": "pytest_xdist_worker_stats-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a9cbeb1f79103c61c63084fcd72dd5f1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 6252,
            "upload_time": "2024-04-16T21:36:44",
            "upload_time_iso_8601": "2024-04-16T21:36:44.316225Z",
            "url": "https://files.pythonhosted.org/packages/d6/4e/7214268ac2e50728129126d7ea99cbd750f25f288d4ab2e31e38582bc674/pytest_xdist_worker_stats-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ade497d497d1e0a031d6688bff6d49ab5afa464bf835f0c7c0c0ba037bbe6b14",
                "md5": "345be4dea921766d057403cb9a39d862",
                "sha256": "4da1811fbbe049fc8c032412dc9771c7c6ba44dda922ee48f0350556b1557f73"
            },
            "downloads": -1,
            "filename": "pytest_xdist_worker_stats-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "345be4dea921766d057403cb9a39d862",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 4691,
            "upload_time": "2024-04-16T21:36:45",
            "upload_time_iso_8601": "2024-04-16T21:36:45.436484Z",
            "url": "https://files.pythonhosted.org/packages/ad/e4/97d497d1e0a031d6688bff6d49ab5afa464bf835f0c7c0c0ba037bbe6b14/pytest_xdist_worker_stats-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-16 21:36:45",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mikicz",
    "github_project": "pytest-xdist-worker-stats",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "pytest-xdist-worker-stats"
}
        
Elapsed time: 0.39197s