pytest plugin for pytest-repeat that generate aggregate report of the same test cases with additional statistics details.
Project description
pytest-aggreport
This pytest plugin was generated with Cookiecutter along with @hackebrot's cookiecutter-pytest-plugin template.
Features
- Generate aggregated test result group by test case name with details;
- Embed test result into html report if pytest-html is available;
Requirements
- python >= 3.6
- pytest >= 4.3.1
- beautifultable >= 0.7.0
- pytest-repeat >= 0.8.0
Installation
You can install "pytest-aggreport" via pip from PyPI:
$ pip install pytest-aggreport
Usage
Pytest will automatically find the plugin and use it when you run pytest with --count
argument (enable pytest-repeat plugin). When test is done, you will see a summary report in the terminal:
$ pytest --count=5
...
------------------------- aggregate summary report -----------------
+-------------+------+------+-------+--------+-------+-------+-------+---------+
| TestCase Na | Pass | Fail | Skipp | Pass R | AVG ( | MAX ( | MIN ( | STDDEV |
| me | ed | ed | ed | ate | s) | s) | s) | (s) |
+-------------+------+------+-------+--------+-------+-------+-------+---------+
| test_pass | 5 | 0 | 0 | 100.00 | 0.1 | 0.1 | 0.1 | 0.0 |
| | | | | % | | | | |
+-------------+------+------+-------+--------+-------+-------+-------+---------+
| test_skip | 0 | 0 | 5 | 0.00% | 0.0 | 0.0 | 0.0 | 0.0 |
+-------------+------+------+-------+--------+-------+-------+-------+---------+
| test_fail | 0 | 5 | 0 | 0.00% | 0.15 | 0.15 | 0.15 | 0.0 |
+-------------+------+------+-------+--------+-------+-------+-------+---------+
| test_xpass | 5 | 0 | 0 | 100.00 | 0.1 | 0.1 | 0.1 | 0.0 |
| | | | | % | | | | |
+-------------+------+------+-------+--------+-------+-------+-------+---------+
| test_xfail | 0 | 5 | 0 | 0.00% | 0.1 | 0.1 | 0.1 | 0.0 |
+-------------+------+------+-------+--------+-------+-------+-------+---------+
...
If pytest-html is enabled(run with --html
argument), then a summary report will also be embedded in the html report:
To disable the plugin, you can use the -p
argument, for example:
$ pytest -p no:aggreport
Contributing
Contributions are very welcome. 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-aggreport" is free and open source software
Issues
If you encounter any problems, please file an issue along with a detailed description.
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
Built Distribution
File details
Details for the file pytest-aggreport-0.1.4.tar.gz
.
File metadata
- Download URL: pytest-aggreport-0.1.4.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c07d53f2caec5618ca3d8e0a9a2ca5757540b139205f697330b854eef3de9b7 |
|
MD5 | e54a57bf71a1c698d12d4e2c974efb14 |
|
BLAKE2b-256 | 15a99a32cfa07d12df36e607a89b394d25eb2a1f719e57dbac3580ed003cf673 |
File details
Details for the file pytest_aggreport-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: pytest_aggreport-0.1.4-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ecc0be5980aa4335f6a9c4fcaa5d50386b6c06d6abb14faf751fb4ebb8e45a6 |
|
MD5 | 93bd4e703e396401704944eb9d16f2a8 |
|
BLAKE2b-256 | c05c1b9911a640b642678da90ad2bee1f6a44f5d086a9ead54aea87ddb81a243 |