pytest-rerun-all


Namepytest-rerun-all JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/TBxy/pytest-rerun-all
SummaryRerun testsuite for a certain time or iterations
upload_time2023-11-16 10:06:55
maintainer
docs_urlNone
authortb
requires_python>=3.9,<3.13
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pytest-rerun-all
Rerun whole testsuites for a certain time or amount

_Still under development._

## Arguments

**`--rerun-time <time>`**  
Rerun testsuite for the specified time, argument as text (e.g `"2 min"`, `"3 hours"`, ...), the default unit is seconds. 

**`--rerun-iter <int>`**  
Rerun testsuite for the specified iterations.

**`--rerun-delay <time>`**  
After each testsuite run wait for the specified time, argument as text (e.g `"2 min"`, `10`, ...), the default unit is seconds.

**`--rerun-fresh`**  
Start each testsuite run with _fresh_ fixtures (teardown all fixtures), per default no teardown is done if not needed.

> **NOTE:** All arguments can also be set as environment variables, e.g. `RERUN_TIME="1 hour"`.

## Examples

```shell
pytest --rerun-time "10 min" examples  # run tests for 10 secons
pytest --rerun-iter 10 examples  # run all tests 10 times
# run all tests 10 times and teardown all fixtures after each run
pytest --rerun-iter 10 --rerun-teardown examples 
# run tests for 2 hours with 10 secons delay after each run
pytest --rerun-time "2 hours" --rerun-dealy "10s" examples 
# run tests for 120 seconds with a fresh restart for each testsuite run
RERUN_FRESH=1 pytest --rerun-time 120 examples 
```

## Installation

You can install `pytest-rerun-all` via [pip] from [PyPI] or this [repo]:

```shell
pip install pytest-rerun-all
pip install git+git@github.com:TBxy/pytest-rerun-all.git@main # latest version
```

## Todos

* Fixture to exclude tests from running more than once (e.g. `@pytest_rerun_all.only_once()`)
* Issue with only one selected test (teardown on frist run)
* Output for each new run
* Summary per test with number of fails and pass (maybe only for failed tests ...)
* Write tests
* Github Actions

## Contributing

Contributions are very welcome. 
Tests are not ready at the moment, use the example scripts.
<!-- Tests can be run with [tox], please ensure
the coverage at least stays the same before you submit a pull request. -->

## License

Distributed under the terms of the [MIT] license, `pytest-rerun-all` is free and open source software


## Issues

If you encounter any problems, please [file an issue] along with a detailed description.

[repo]: https://github.com/TBxy/pytest-rerun-all
[Cookiecutter]: https://github.com/audreyr/cookiecutter
[@hackebrot]: https://github.com/hackebrot
[MIT]: http://opensource.org/licenses/MIT
[cookiecutter-pytest-plugin]: https://github.com/pytest-dev/cookiecutter-pytest-plugin
[file an issue]: https://github.com/TBxy/pytest-rerun-all/issues
[pytest]: https://github.com/pytest-dev/pytest
[tox]: https://tox.readthedocs.io/en/latest/
[pip]: https://pypi.org/project/pip/
[PyPI]: https://pypi.org/project/pytest-rerun-all

----

This [pytest] plugin was generated with [Cookiecutter] along with [@hackebrot]'s [cookiecutter-pytest-plugin] template.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/TBxy/pytest-rerun-all",
    "name": "pytest-rerun-all",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9,<3.13",
    "maintainer_email": "",
    "keywords": "",
    "author": "tb",
    "author_email": "tb@wodore.com",
    "download_url": "https://files.pythonhosted.org/packages/43/33/4cee6edf0660847a5ba41ca18e2ad1da89cbbfa1154a7dd1e68d8eca3a1b/pytest_rerun_all-0.1.0.tar.gz",
    "platform": null,
    "description": "# pytest-rerun-all\nRerun whole testsuites for a certain time or amount\n\n_Still under development._\n\n## Arguments\n\n**`--rerun-time <time>`**  \nRerun testsuite for the specified time, argument as text (e.g `\"2 min\"`, `\"3 hours\"`, ...), the default unit is seconds. \n\n**`--rerun-iter <int>`**  \nRerun testsuite for the specified iterations.\n\n**`--rerun-delay <time>`**  \nAfter each testsuite run wait for the specified time, argument as text (e.g `\"2 min\"`, `10`, ...), the default unit is seconds.\n\n**`--rerun-fresh`**  \nStart each testsuite run with _fresh_ fixtures (teardown all fixtures), per default no teardown is done if not needed.\n\n> **NOTE:** All arguments can also be set as environment variables, e.g. `RERUN_TIME=\"1 hour\"`.\n\n## Examples\n\n```shell\npytest --rerun-time \"10 min\" examples  # run tests for 10 secons\npytest --rerun-iter 10 examples  # run all tests 10 times\n# run all tests 10 times and teardown all fixtures after each run\npytest --rerun-iter 10 --rerun-teardown examples \n# run tests for 2 hours with 10 secons delay after each run\npytest --rerun-time \"2 hours\" --rerun-dealy \"10s\" examples \n# run tests for 120 seconds with a fresh restart for each testsuite run\nRERUN_FRESH=1 pytest --rerun-time 120 examples \n```\n\n## Installation\n\nYou can install `pytest-rerun-all` via [pip] from [PyPI] or this [repo]:\n\n```shell\npip install pytest-rerun-all\npip install git+git@github.com:TBxy/pytest-rerun-all.git@main # latest version\n```\n\n## Todos\n\n* Fixture to exclude tests from running more than once (e.g. `@pytest_rerun_all.only_once()`)\n* Issue with only one selected test (teardown on frist run)\n* Output for each new run\n* Summary per test with number of fails and pass (maybe only for failed tests ...)\n* Write tests\n* Github Actions\n\n## Contributing\n\nContributions are very welcome. \nTests are not ready at the moment, use the example scripts.\n<!-- Tests can be run with [tox], please ensure\nthe coverage at least stays the same before you submit a pull request. -->\n\n## License\n\nDistributed under the terms of the [MIT] license, `pytest-rerun-all` is free and open source software\n\n\n## Issues\n\nIf you encounter any problems, please [file an issue] along with a detailed description.\n\n[repo]: https://github.com/TBxy/pytest-rerun-all\n[Cookiecutter]: https://github.com/audreyr/cookiecutter\n[@hackebrot]: https://github.com/hackebrot\n[MIT]: http://opensource.org/licenses/MIT\n[cookiecutter-pytest-plugin]: https://github.com/pytest-dev/cookiecutter-pytest-plugin\n[file an issue]: https://github.com/TBxy/pytest-rerun-all/issues\n[pytest]: https://github.com/pytest-dev/pytest\n[tox]: https://tox.readthedocs.io/en/latest/\n[pip]: https://pypi.org/project/pip/\n[PyPI]: https://pypi.org/project/pytest-rerun-all\n\n----\n\nThis [pytest] plugin was generated with [Cookiecutter] along with [@hackebrot]'s [cookiecutter-pytest-plugin] template.\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Rerun testsuite for a certain time or iterations",
    "version": "0.1.0",
    "project_urls": {
        "Changelog": "https://github.com/TBxy/pytest-rerun-all/blob/main/CHANGELOG.md",
        "Homepage": "https://github.com/TBxy/pytest-rerun-all",
        "Issues": "https://github.com/TBxy/pytest-rerun-all/issues",
        "Repository": "https://github.com/TBxy/pytest-rerun-all"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "eb56e498aa21c60b54cbcbf09b931127c43d827afead7b9f6a34004eb837a8be",
                "md5": "3a3fbcd57600439c277ec73330870b40",
                "sha256": "5786ef867c3d94137e5c57fbb923ea7bdd3dd87ab5f579893c7d204fe3a6fd6b"
            },
            "downloads": -1,
            "filename": "pytest_rerun_all-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3a3fbcd57600439c277ec73330870b40",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9,<3.13",
            "size": 6677,
            "upload_time": "2023-11-16T10:06:53",
            "upload_time_iso_8601": "2023-11-16T10:06:53.859807Z",
            "url": "https://files.pythonhosted.org/packages/eb/56/e498aa21c60b54cbcbf09b931127c43d827afead7b9f6a34004eb837a8be/pytest_rerun_all-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "43334cee6edf0660847a5ba41ca18e2ad1da89cbbfa1154a7dd1e68d8eca3a1b",
                "md5": "736e8b7fbeae3db0a163b9a768292677",
                "sha256": "1906254fb5ed904df0907b00bbe568391d6ca6bd45271c855c9b2292dd0787c3"
            },
            "downloads": -1,
            "filename": "pytest_rerun_all-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "736e8b7fbeae3db0a163b9a768292677",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9,<3.13",
            "size": 6897,
            "upload_time": "2023-11-16T10:06:55",
            "upload_time_iso_8601": "2023-11-16T10:06:55.335409Z",
            "url": "https://files.pythonhosted.org/packages/43/33/4cee6edf0660847a5ba41ca18e2ad1da89cbbfa1154a7dd1e68d8eca3a1b/pytest_rerun_all-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-16 10:06:55",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "TBxy",
    "github_project": "pytest-rerun-all",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "appveyor": true,
    "tox": true,
    "lcname": "pytest-rerun-all"
}
        
tb
Elapsed time: 0.15073s