Skip to main content

Formatting PyTest output for Azure Pipelines UI

Project description

Build status PyPI version Python versions

Formatting PyTest output for Azure Pipelines UI


Formats the PyTest output to show test docstrings and module names instead of just test case names in the Azure Pipelines UI.

Requires the –junit-xml flag on execution as per normal Azure Pipelines usage.

Installation

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

$ pip install pytest-azurepipelines

Usage

This plugin requires no configuration, it modifies the node (test) name in the Junit XML output so that when Azure Pipelines test UI loads them you can see in more detail which test was executed.

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 test/ --junitxml=junit/test-results.xml
  displayName: 'pytest'

- task: PublishTestResults@2
  inputs:
    testResultsFiles: '**/test-results.xml'
    testRunTitle: 'Python $(python.version)'
  condition: succeededOrFailed()

Contributing

Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.

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.1.1.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

pytest_azurepipelines-0.1.1-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytest-azurepipelines-0.1.1.tar.gz
  • Upload date:
  • Size: 3.7 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.1.1.tar.gz
Algorithm Hash digest
SHA256 9b78fe13003c611c5422fd00bbc7eaf9067bb0d44a72e9db8f645fdef0ebb11d
MD5 1a3d6b697053978f50eb0cc49d7b6f6e
BLAKE2b-256 3f7f39b8b3ec6239962bb5cb128a4cd88ed71f3a1ab4225529cf232df91dd14d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pytest_azurepipelines-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.1 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.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fa3b3566b90991d14b533b6fb866edeac1238e08555c5787993f488dd2abcaf6
MD5 455023299195e0ad6e67885dfb37a833
BLAKE2b-256 b56e029aebe88cec19b7881577903cd37122c1922535845f3e998fbc0166e01b

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