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.

Source Distribution

pytest-buildkite-0.3.0.tar.gz (5.0 kB view details)

Uploaded Source

Built Distributions

pytest_buildkite-0.3.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

pytest_buildkite-0.3.0-py2-none-any.whl (5.2 kB view details)

Uploaded Python 2

File details

Details for the file pytest-buildkite-0.3.0.tar.gz.

File metadata

  • Download URL: pytest-buildkite-0.3.0.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for pytest-buildkite-0.3.0.tar.gz
Algorithm Hash digest
SHA256 4393589b8273d54cefa16fdb1107bc6e47a3eb94acd2a6012669fcdb36e85f04
MD5 84aeaeef0d8fd6ba685ee4571d44ed74
BLAKE2b-256 c5be4571fd564df8965a3ec44a34db62e98c78de04223980973c3e0ffe0b2769

See more details on using hashes here.

File details

Details for the file pytest_buildkite-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: pytest_buildkite-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for pytest_buildkite-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 36b634c9e980e78659886eb7634a5cfd8b2bf249016a962769b40f9c76c079fe
MD5 279c5dbca19cca7cae89b0094662fde5
BLAKE2b-256 cc88112d3239d99a98a79b5556aabdd22b50355382e208bef3636a210ad45fe5

See more details on using hashes here.

File details

Details for the file pytest_buildkite-0.3.0-py2-none-any.whl.

File metadata

  • Download URL: pytest_buildkite-0.3.0-py2-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for pytest_buildkite-0.3.0-py2-none-any.whl
Algorithm Hash digest
SHA256 1eca7c90379d77c1e6eca22dd4903a7f88685ed0b65c1172d6b8f895f52bbce9
MD5 63114a53b447e5cee51046037e7bf059
BLAKE2b-256 a3fbbb131de1cb693fc546ee0bd0f22804cabfb812d826325cf219f156174f42

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page