integration_orchestrator

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2026 License: MIT Imports: 4 Imported by: 0

README

Integration Orchestrator (pkg/core/tools/integration_orchestrator)

The Integration Orchestrator Module manages complex, multi-step API workflows.

Key Tool: orchestrate_integration

This tool executes sequences of dependent API calls, passing data (like IDs or tokens) from one step to the next.

Features
  • State Management: captures variables from responses (e.g., userId from a create response) and uses them in subsequent requests.
  • Workflow Definitions: Supports defining complex user journeys (e.g., Register -> Login -> Create Order -> Check History).
  • Assertions: Validates the success of the entire chain, not just individual requests.

Usage

Use this tool when you need to verify a complete business process rather than a single endpoint.

Example Prompts

Trigger this tool by asking:

  • "Test the full user registration and login flow."
  • "Run an integration test for the checkout process (add item -> cart -> pay)."
  • "Verify that a user can be created, updated, and then deleted."

Documentation

Overview

Package integration_orchestrator provides multi-step integration test workflows for ZAP.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Environment

type Environment struct {
	BaseURL string
	State   map[string]interface{}
}

Environment manages the context and state across workflow steps.

func NewEnvironment

func NewEnvironment(baseURL string) *Environment

NewEnvironment creates a new environment context.

func (*Environment) Get

func (e *Environment) Get(key string) interface{}

Get retrieves a value from the shared state.

func (*Environment) ResolveURL

func (e *Environment) ResolveURL(path string) string

ResolveURL combines the base URL with a step path.

func (*Environment) Set

func (e *Environment) Set(key string, value interface{})

Set stores a value in the shared state.

type IntegrationOrchestratorTool

type IntegrationOrchestratorTool struct {
	// contains filtered or unexported fields
}

IntegrationOrchestratorTool handles multi-step API workflows and integration tests.

func NewIntegrationOrchestratorTool

func NewIntegrationOrchestratorTool(falconDir string, httpTool *shared.HTTPTool) *IntegrationOrchestratorTool

NewIntegrationOrchestratorTool creates a new integration orchestrator tool.

func (*IntegrationOrchestratorTool) Description

func (t *IntegrationOrchestratorTool) Description() string

func (*IntegrationOrchestratorTool) Execute

func (t *IntegrationOrchestratorTool) Execute(args string) (string, error)

func (*IntegrationOrchestratorTool) Name

func (*IntegrationOrchestratorTool) Parameters

func (t *IntegrationOrchestratorTool) Parameters() string

type OrchestrateParams

type OrchestrateParams struct {
	Workflow      []WorkflowStep `json:"workflow"`           // List of steps to execute
	BaseURL       string         `json:"base_url,omitempty"` // Global base URL
	StopOnFailure bool           `json:"stop_on_failure"`    // Whether to halt if a step fails
}

OrchestrateParams defines the parameters for a workflow orchestration.

type OrchestrateResult

type OrchestrateResult struct {
	TotalSteps  int          `json:"total_steps"`
	Completed   int          `json:"completed_steps"`
	Failed      int          `json:"failed_steps"`
	StepResults []StepResult `json:"step_results"`
	Summary     string       `json:"summary"`
}

OrchestrateResult represents the outcome of the entire workflow.

type StepResult

type StepResult struct {
	StepID      string `json:"step_id"`
	Description string `json:"description"`
	Status      string `json:"status"` // pass, fail, skipped
	Message     string `json:"message,omitempty"`
}

StepResult details the outcome of an individual step.

type WorkflowManager

type WorkflowManager struct {
	// contains filtered or unexported fields
}

WorkflowManager orchestrates the execution of individual steps.

func (*WorkflowManager) Run

func (m *WorkflowManager) Run(steps []WorkflowStep, stopOnFailure bool) OrchestrateResult

Run executes the workflow steps in sequence.

type WorkflowStep

type WorkflowStep struct {
	ID          string                 `json:"id"`
	Description string                 `json:"description,omitempty"`
	Action      string                 `json:"action"`           // http, wait, extract, assert
	Params      map[string]interface{} `json:"params,omitempty"` // Action-specific parameters
}

WorkflowStep represents a single action in the integration test.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL