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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for ntf_sample_plugin-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 fc4ae0a9ee032c9574822487bd1e67ddb9f194e9173fb70bf52153d0ee0b1ee8
MD5 064982aad219c873a8c2f4d057cefe06
BLAKE2b-256 44d488299803fc459f99fa4f4bd163101e182ec2ce977531304f99f6dbdf6bc1

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