Автоматизация Фреймворк

Это дополнение обеспечивает структуру, которая позволяет автоматизировать ZAP простым и гибким способом.

Command Line Options

Он предоставляет следующие параметры командной строки:

Exit Codes

If the -autorun option is used with the ZAP -cmd option then the ZAP exit value will be set by default as follows: These values can be overridden by the exitStatus job.
Whether the plan completed after encountering errors or warnings will depend on the settings used in the environment.

Usage

Чтобы использовать среду автоматизации:
  1. Создайте файл автоматизации шаблона, используя один из параметров командной строки -autogen *
  2. Отредактируйте файл в соответствии с вашими требованиями
  3. Запустите файл с помощью параметра командной строки -autorun , например. ./zap.sh -cmd -autorun config.yaml
Note: The Jobs are executed in the order in which they appear (top to bottom) within the Plan.

В большинстве случаев рекомендуется также использовать параметр командной строки -cmd , чтобы рабочий стол ZAP не отображался. и ZAP завершает работу, как только завершит создание или выполнение заданий, определенных в файле. Однако вы можете запускать задания Automation Framework с помощью рабочего стола ZAP, чтобы помочь вам отладить проблемы.

Аутентификация

The Automation Framework supports all of the authentication mechanisms supported by ZAP.

GUI (Графический Интерфейс)

GUI находится в стадии разработки и предоставляет постоянно расширяющийся набор функций.

Options

The Automation Options screen allows you to configure specific options.

API

The following API endpoints are provided by this add-on: If the ZAP desktop is being used then the plan will also be shown in the GUI to make it easier to diagnose any problems.

Note that some jobs may not stop immediately, for example if authentication is being handled.

Environment

The environment section of the file defines the applications which the rest of the jobs can act on.

File Paths

All file and directory paths can either be absolute or relative to the directory containing the plan. Relative paths are recommended for portability.

Jobs

The following automation jobs are supported by this add-on:

General Job Options

The following options can be applied to all jobs, via the automation plan or the GUI:

Importance of Job Order

The order of jobs is relevant and important. For example:

Рабочие тесты могут быть добавлены к заданиям, чтобы проверить, что задания выполняются должным образом.

Эта структура является подключаемой, поэтому другие надстройки могут добавлять поддержку для других заданий, см. Automation Framework для получения более полного списка.

Шаблоны «min» и «max» включают комментарии, дающие дополнительную информацию о полях.