Skip to main content

Reusable Behave hooks for Selenium + OWASP ZAP integration.

Project description

behave-zap

behave-zap is a working Python library that integrates Behave and OWASP ZAP into a single, reusable web testing + DAST execution model.

It is designed for teams that want:

  • Functional browser automation and security scanning in the same run
  • Per-feature control of active scan targets
  • A final consolidated ZAP report with all discovered alerts
  • A CI-friendly flow with reference pipeline examples

integration

Why this library

Security scanning is often bolted on after functional testing. behave-zap makes DAST a first-class part of your Behave lifecycle:

  • Hook-based orchestration for before_all, after_feature, and after_all
  • Chrome-focused web automation primitives for page objects and driver setup
  • Feature-level attack-surface segmentation through target mapping
  • Final report generation after full test execution

Core architecture

  • behave_zap/hooks.py
    • Behave lifecycle integration
    • ZAP initialization, passive/active scan orchestration, final reports
  • behave_zap/web.py
    • Chrome WebDriver creation
    • Context + page-object base classes (PageObject, Button, InputText, etc.)

Installation

Install as editable package in this repository:

pip install -e .

Install from a consumer project:

pip install behave-zap

Quick start

Note: For a full, hands-on CI example (including GitHub Actions, ZAP annotations and behave-zap usage), see the learning repository: https://github.com/testingsoul/behave-zap_learning

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

behave_zap-0.2.0.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

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

behave_zap-0.2.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file behave_zap-0.2.0.tar.gz.

File metadata

  • Download URL: behave_zap-0.2.0.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for behave_zap-0.2.0.tar.gz
Algorithm Hash digest
SHA256 eebab07a6ff2e0825ab1437b33cbb2776b107811e6302e69fb0722d54729aa32
MD5 e0ef2ce547e9e4bd55925b3561e50c0e
BLAKE2b-256 d55ef92ad5ab42e7469c5e8a6484a1397b00c4713906eed19c5219f31c63347d

See more details on using hashes here.

Provenance

The following attestation bundles were made for behave_zap-0.2.0.tar.gz:

Publisher: publish-pypi-release.yml on testingsoul/behave-zap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file behave_zap-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: behave_zap-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for behave_zap-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 855d3359e3b8105967a502ae91637596197d98e1eddca4509653079fb57cc4fe
MD5 369f99bd71aa2d75f153619f1ced837d
BLAKE2b-256 d4bba2d97294af8affe4248f5d4f8e34e975383846388360cae9fbe29ad880ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for behave_zap-0.2.0-py3-none-any.whl:

Publisher: publish-pypi-release.yml on testingsoul/behave-zap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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