Skip to content

Developing with the HUD

thc202 edited this page Nov 24, 2020 · 9 revisions

Dependencies

ZAP requires Java 8 or higher. While ZAP (and the HUD) can be run with newer Java versions for development it's recommended to use Java 8 or 11, newer versions might not work.

Installing

Clone the repo using:

git clone https://github.com/zaproxy/zap-hud.git

Run ZAP with the HUD

This is the easiest way to manually test the HUD if you have made any changes.

Cd into the zap-hud directory and run ZAP on Linux or MacOS with the HUD using:

./gradlew runZap

Windows is not currently supported but will be soon.

Run the unit tests

./gradlew test

Run the selenium regression tests

./gradlew zapRunTests

Out of date instructions?

Install npm from the Node.js site.

After installing run npm install in the zap-hud directory to install the HUD dependences.

Building

The HUD uses webpack as its static module bundler to transpile Vue & javascript files.

Run webpack with: npm run build

The HUD uses Gradle as its Java build tool.

Run the following command from the root directory: gradle deploy

Testing

The HUD uses ava as its testing framework.

Run all tests with:

npm run test or gradle npmTestHud

Tests are found in the src/test/js directory.

Linting

The HUD uses xo as its linter.

Run the linter with:

npm run lint or gradle npmLintAllHud

If you want to lint just the staged changes use:

npm run lint-staged or gradle npmLintStagedHud