Skip to main content

Plugin for pytest that automatically publishes coverage and pytest report annotations to Buildkite.

Project description

Build status PyPI version Python versions PyPI download month

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.

Additional Documentation

Project details


Download files

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

Files for pytest-buildkite, version 0.3.0
Filename, size File type Python version Upload date Hashes
Filename, size pytest_buildkite-0.3.0-py2-none-any.whl (5.2 kB) File type Wheel Python version py2 Upload date Hashes View hashes
Filename, size pytest_buildkite-0.3.0-py3-none-any.whl (5.2 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size pytest-buildkite-0.3.0.tar.gz (5.0 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page