Formatting PyTest output for Azure Pipelines UI
Project description
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
Displays the number of failed tests if there were failures as an error message in the UI
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pytest-azurepipelines-0.4.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 735376a7c930e7d8950cafd3f2c43b20cbee3046298f82f2ad39146746e7f123 |
|
MD5 | 26d7696055e5896c8f63b4168928c2fb |
|
BLAKE2b-256 | 1ae9b8bc372fc63ab5fb77848c467bc731d53e7635e40ffb1e8ae55b2614e56a |
Hashes for pytest_azurepipelines-0.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22043a45274a62a956cb8a6cabf8932562b790f2512483d42516931a17164592 |
|
MD5 | 94b6754bd78dc9f86abb197e48bbadc4 |
|
BLAKE2b-256 | 2141ed396d9bb8f34479bfa03e04e74c71755aa2d4c36911f06977f998faecf0 |