Skip to main content

A pytest plugin for configuring workflow/pipeline tests using YAML files

Project description

pytest-workflow is a pytest plugin that aims to make pipeline/workflow testing easy by using yaml files for the test configuration.

For our complete documentation checkout our readthedocs page.

Installation

Pytest-workflow requires Python 3.5 or higher. It is tested on Python 3.5, 3.6 and 3.7. Python 2 is not supported.

  • Make sure your virtual environment is activated.

  • Install using pip pip install pytest-workflow

  • Create a tests directory in the root of your repository.

  • Create your test yaml files in the tests directory.

Quickstart

Run pytest from an environment with pytest-workflow installed. Pytest will automatically gather files in the tests directory starting with test and ending in .yaml or .yml.

Below is an example of a YAML file that defines a test:

- name: Touch a file
  command: touch test.file
  files:
    - path: test.file

This will run touch test.file and check afterwards if a file with path: test.file is present. It will also check if the command has exited with exit code 0, which is the only default test that is run. Testing workflows that exit with another exit code is also possible.

Documentation for more advanced use cases can be found on our readthedocs page.

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-workflow-0.3.0.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytest_workflow-0.3.0-py3-none-any.whl (30.3 kB view details)

Uploaded Python 3

File details

Details for the file pytest-workflow-0.3.0.tar.gz.

File metadata

  • Download URL: pytest-workflow-0.3.0.tar.gz
  • Upload date:
  • Size: 14.5 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.5.3

File hashes

Hashes for pytest-workflow-0.3.0.tar.gz
Algorithm Hash digest
SHA256 9e44fefb916dd5e699b40920c56f89e1662145f569c98fba5345e10047df7ea0
MD5 181b7f10fb56997fada90a5ef8c0f52b
BLAKE2b-256 adde24f18cf0d25b0019940c1b47566a48c751367be4c0e66d3c5d929c9f493b

See more details on using hashes here.

File details

Details for the file pytest_workflow-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: pytest_workflow-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 30.3 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.5.3

File hashes

Hashes for pytest_workflow-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9d5e5f5b1e81bcec5c189827107cef44280cd3ea3cc322d1347565a878feb167
MD5 b45f760f5328ba32f82104446b9d0715
BLAKE2b-256 b91869378a2547cdea36311fd364a53d0c1f5ed2d5be582285f6030ab1ac7b7a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page