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

In order to access the Buildkite agent the docker will need access to the buildkite-agent binary (either by extending from the official Buildkite docker image or by installing it in the docker or mounting from the host). Also make sure that the docker image CA certificates are installed so that it can publish annotations back to Buildkite via HTTPS. Additionally make sure you pass down the numerous Buildkite Environment Variables. If you do mount the agent to provide access you may find you need to mount a few additional programs called from the agent e.g.:

volumes:
  - type: bind
    source: /usr/bin/buildkite-agent
    target: /usr/bin/buildkite-agent
  - type: bind
    source: /usr/bin/buildkite-agent-original
    target: /usr/bin/buildkite-agent-original

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


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.1.5.dev0.tar.gz (6.0 kB view hashes)

Uploaded Source

Built Distributions

pytest_buildkite-0.1.5.dev0-py3-none-any.whl (5.6 kB view hashes)

Uploaded Python 3

pytest_buildkite-0.1.5.dev0-py2-none-any.whl (5.6 kB view hashes)

Uploaded Python 2

Supported by

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