Skip to main content

Formatting PyTest output for Azure Pipelines UI

Project description

Build status PyPI version Python versions

Making Pytest easier to use with Microsoft Azure Pipelines.

Just run pytest with this plugin and see your test results in the Azure Pipelines UI!


Features:

  • Formats the PyTest output to show test docstrings and module names instead of just test case names in the Azure Pipelines 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

https://github.com/tonybaloney/pytest-azurepipelines/raw/master/screenshot.png

Installation

You can install “pytest-azurepipelines” via pip from PyPI:

$ pip install pytest-azurepipelines

Usage

This plugin requires no configuration.

Here is an example of installing the plugin and running the tests.

- script: |
    python -m pip install --upgrade pip
    pip install pytest pytest-azurepipelines
    pip install -e .
  displayName: 'Install dependencies'

- script: |
    python -m pytest tests/
  displayName: 'pytest'

If you want to change the Azure Pipelines “Test Run Title”, you can provide the –test-run-title flag with the run title.

- script: |
    pip install pytest pytest-azurepipelines
    pytest tests/ --test-run-title="Windows Test with junitxml"
  displayName: 'pytest with junitxml flag'

Contributing

Contributions are very welcome.

License

Distributed under the terms of the MIT license, “pytest-azurepipelines” 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-azurepipelines-0.2.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

pytest_azurepipelines-0.2.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file pytest-azurepipelines-0.2.0.tar.gz.

File metadata

  • Download URL: pytest-azurepipelines-0.2.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.1

File hashes

Hashes for pytest-azurepipelines-0.2.0.tar.gz
Algorithm Hash digest
SHA256 84b0d99f0740a64ca71196d8e1501a095cb5dc73f89c68ed41d3a3fa46fddd9f
MD5 8fbec0a40b2cb23441166d81bef072f3
BLAKE2b-256 7dbc40cd2acde14d591e72f51f96cf95dbd40260f44d315bcd53af9517c53a67

See more details on using hashes here.

File details

Details for the file pytest_azurepipelines-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: pytest_azurepipelines-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.1

File hashes

Hashes for pytest_azurepipelines-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 282292e7ee3aeaa3188395e3ece25c5e31037d26349bae06d9f99c246d1492f3
MD5 f63e309c4afb0a38a7b0f14f07323c10
BLAKE2b-256 0b304bbb926c0b08bf3760a3de50dccc184477b22763eeb54187995dee3a13d5

See more details on using hashes here.

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