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-1.0.0.tar.gz (15.7 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-1.0.0-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for behave_zap-1.0.0.tar.gz
Algorithm Hash digest
SHA256 7a0c6c8ce987c1a5f4805fd2f68f0041f5c00aef26b03c79af3f2c8a8fdaa9eb
MD5 5d7fb8d0b8feba01e1997c000f7c0ecb
BLAKE2b-256 e04c195c1c95f6648c7f30e3f7d6b5d872384fd74354a06f81ef5866375867ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for behave_zap-1.0.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-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: behave_zap-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 18.4 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-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e6c424142645dbf8ccd9eac641c9cdca698de93380fabbea6515c334677c9c3f
MD5 c0a518925ee95aa61f5e7ae8c2792216
BLAKE2b-256 96b986a5a9cbdcc14103fd4f2d7bc385273b48cf0dbdb9af41012382558e7838

See more details on using hashes here.

Provenance

The following attestation bundles were made for behave_zap-1.0.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