Plugin for pytest that automatically publishes coverage and pytest report annotations to Buildkite.
Project description
Note: This library was repurposed from tonybaloney’s pytest-azurepipelines, the repurposing process is not yet complete.
Plugin for pytest that automatically publishes coverage and pytest report annotations to BuildKite.
Just run pytest with this plugin and see your test results in the BuildKite UI!
Features:
Formats the PyTest output to show test docstrings and module names instead of just test case names in the Buildkite UI.
Overloads the –junit-xml flag on execution with a default value
Uploads test results automatically, no need for a seperate test results upload command
Displays the number of failed tests if there were failures as an error message in the UI
Automatically formats code coverage and uploads coverage data if pytest-cov is installed
Installation
You can install “pytest-buildkite” via pip from PyPI:
$ pip install pytest-buildkite
Running in Docker
The plugin attempts to automatically detect if running inside a docker container with path mounted in a different location, it will apply the mappings to the path to report them back to Azure Pipelines using the path from the host that has been bind mounted to the docker container. No configuration is required it should just work as long as bind mounting is used to the path the pytest output is written to. Also ensure the files are written using an account the host has access to, this can be done by supplying the user and group of the host account to the run command.
docker run --user "$(id -u):$(id -g)" ...
Contributing
Contributions are very welcome.
License
Distributed under the terms of the MIT license, “pytest-buildkite” is free and open source software
Issues
If you encounter any problems, please file an issue along with a detailed description.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for pytest-buildkite-0.1.4.dev0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 400b57826973d11e68f048d23d662d47f3c340dbcc1217f82e2b8de5c6b91b39 |
|
MD5 | b6d69438ded389200c5f88f69a74167d |
|
BLAKE2b-256 | 4a9d78f7053357118f64121991dd600bb17fdd37aa78aae2e0adb3a5d679e6a2 |
Hashes for pytest_buildkite-0.1.4.dev0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 755449a135af6009a7a49943029828b3595fafe04eff68bbd70d012bb134bb11 |
|
MD5 | d6243cb85c712432f517c4925e3c7383 |
|
BLAKE2b-256 | 4bf279671bc3ffef276671a88923987d8c08765d2219ba29cb66a8fd2fc3bc57 |
Hashes for pytest_buildkite-0.1.4.dev0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9c0b75d2e6cd8f4a7a12d92a1500f54629b64147bb7d12242b1893401c1e4d7 |
|
MD5 | ad025bb27d20408940b018e0bdd2fec9 |
|
BLAKE2b-256 | 04f05c258d647e8f4a3842fa40a5718e5073c1bb82a6e43ccf8005030822b7c8 |