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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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