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.6-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for ntf_sample_plugin-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 eebddf70d6cee474e1aa1813b13d194239bd850db96961e6bea3df81766bc470
MD5 3baf059dde7b332c26bed0636b42efea
BLAKE2b-256 c8674e878ec3f6f74ad1858b0aae0cf3a6ae21b7eae297d80e87ae03d3aa0eef

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