Skip to main content

Sample plugin pack for PytestOps (ntf)

Project description

ntf-sample-plugin

Sample plugin pack for PytestOps (ntf). It demonstrates all plugin entry-points:

  • ntf.assertions (custom assertion)
  • ntf.functions (custom renderer functions)
  • ntf.reporters (custom report output)
  • ntf.transports (custom transport factory)
  • ntf.renderers (custom renderer)

Install (local)

cd plugins/ntf_sample_plugin
python -m pip install -e .

Usage

Custom assertion: startswith

validate:
  - startswith: {"body.message": "ok"}

Custom functions

request:
  json:
    ts: "${now_iso()}"
    rid: "${rand_int(1000,9999)}"

Custom reporter

ntf run-yaml --config configs/default.yaml --cases tests/data --reporter print

Optionally write JSON report with:

set NTF_SAMPLE_REPORT=report/sample-plugin.json

Custom transport

ntf run-yaml --config configs/default.yaml --cases tests/data --transport requests_no_session

Custom renderer

ntf run-yaml --config configs/default.yaml --cases tests/data --renderer upper

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

ntf_sample_plugin-0.1.8.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

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

ntf_sample_plugin-0.1.8-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file ntf_sample_plugin-0.1.8.tar.gz.

File metadata

  • Download URL: ntf_sample_plugin-0.1.8.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.13

File hashes

Hashes for ntf_sample_plugin-0.1.8.tar.gz
Algorithm Hash digest
SHA256 582e14d80dcb55216020e7bd791293ecd5bd5fa580e4ae909ec10dcb6555505d
MD5 ec79feefd2eecc92a98bc29afdc5a03a
BLAKE2b-256 ce7b369429060b7ff3710a31e7fccd8ecbd138bb9c7ac87b8683d279f54ebcae

See more details on using hashes here.

File details

Details for the file ntf_sample_plugin-0.1.8-py3-none-any.whl.

File metadata

File hashes

Hashes for ntf_sample_plugin-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 ddc90c0d4af0276e9868309f5afba04dea5669f33adbf91e00e2f33e817336e6
MD5 639d73c306cb7249c40afd42d6ff93ee
BLAKE2b-256 24c74b19c1a18bccb72872762e2eb1905a404a09a828a8eda534a096c91d3003

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