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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for ntf_sample_plugin-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 f86671a0cb63c698eea028534aaa60e6ea8197efe16696bdcc0d2aa028c2fb10
MD5 0e9ea1e1c41243b3c879d66e2247968e
BLAKE2b-256 f1151399e030d9006a7d6f3c08eade555d62fe6338c22fa6a90fa24d10a9323d

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