Skip to content

robertobernabe/pytest-artifacts

Repository files navigation

pytest-artifacts

Project Status: Active – The project has reached a stable, usable state and is being actively developed. Python package

pytest-artifacts is a plugin for py.test which is able to collect artifacts after the testrun.

Requirements:

You will need the following prerequisites in order to use pytest-artifacts:

  • Python 3.x

Usage:

pytest tests\ --collect-artifacts *.txt

This command line will run tests located in tests\ and collect all files with the extension .txt after the testrun finished.

platform win32 -- Python 3.7.9, pytest-6.2.2, py-1.10.0, pluggy-0.13.1
rootdir: C:\Users\robertobernabe\pytest-artifacts
plugins: artifacts-2021.3.17
collected 6 items

tests\test_artifacts_collector.py .                                              [ 16%] 
tests\test_collector.py .                                                        [ 33%] 
tests\test_pytest_artifacts_plugin.py ....                                       [100%] 

Collected the following artifacts: ['requirements.txt']
Copied artifacts to C:\Users\robertobernabe\pytest-artifacts\pytest-artifacts

You are also able to compress the found artifacts with --compress-artifacts.

platform win32 -- Python 3.7.9, pytest-6.2.2, py-1.10.0, pluggy-0.13.1
rootdir: C:\Users\robertobernabe\pytest-artifacts
plugins: artifacts-2021.3.17
collected 6 items

tests\test_artifacts_collector.py .                                               [ 16%] 
tests\test_collector.py .                                                         [ 33%] 
tests\test_pytest_artifacts_plugin.py ....                                        [100%] 

Collected the following artifacts: ['requirements.txt']
Compressed artifacts to C:\Users\robertobernabe\pytest-artifacts\pytest-artifacts\pytest-artifacts.zip

About

Plugin for py.test to collect test artifacts

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages