Metadata-Version: 2.4
Name: behave-zap
Version: 0.2.0
Summary: Reusable Behave hooks for Selenium + OWASP ZAP integration.
Author: testingsoul
License-Expression: MIT
Project-URL: Homepage, https://github.com/testingsoul/behave-zap
Project-URL: Repository, https://github.com/testingsoul/behave-zap
Project-URL: Issues, https://github.com/testingsoul/behave-zap/issues
Keywords: behave,zaproxy,owasp-zap,dast,selenium,security-testing
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: Security
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: behave==1.2.6
Requires-Dist: selenium>=4.34.0
Requires-Dist: zaproxy>=0.3.2
Dynamic: license-file

# 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](docs/DAST_flow.png)

## 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:

```bash
pip install -e .
```

Install from a consumer project:

```bash
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

- Test execution guide: [docs/test.md](docs/test.md)
- Full library experience: [docs/library-experience.md](docs/library-experience.md)
