Documentation
¶
Overview ¶
Package data_driven_engine provides template-based parameterized test execution for ZAP.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataDrivenEngineTool ¶
type DataDrivenEngineTool struct {
// contains filtered or unexported fields
}
DataDrivenEngineTool executes test scenarios using data from external sources.
func NewDataDrivenEngineTool ¶
func NewDataDrivenEngineTool(falconDir string, httpTool *shared.HTTPTool, testExecutor *shared.TestExecutor, reportWriter *shared.ReportWriter) *DataDrivenEngineTool
NewDataDrivenEngineTool creates a new data-driven engine tool.
func (*DataDrivenEngineTool) Description ¶
func (t *DataDrivenEngineTool) Description() string
func (*DataDrivenEngineTool) Execute ¶
func (t *DataDrivenEngineTool) Execute(args string) (string, error)
func (*DataDrivenEngineTool) Name ¶
func (t *DataDrivenEngineTool) Name() string
func (*DataDrivenEngineTool) Parameters ¶
func (t *DataDrivenEngineTool) Parameters() string
type DataDrivenParams ¶
type DataDrivenParams struct {
Scenario shared.TestScenario `json:"scenario"` // Base scenario template
DataSource string `json:"data_source"` // Path to CSV/JSON file or 'fake'
Variables []string `json:"variables"` // Variable names to map
MaxRows int `json:"max_rows,omitempty"` // Limit number of rows to process
ReportName string `json:"report_name,omitempty"` // e.g. "data_driven_report_users"
}
DataDrivenParams defines parameters for data-driven testing.
type DataDrivenResult ¶
type DataDrivenResult struct {
TotalRows int `json:"total_rows"`
PassedRows int `json:"passed_rows"`
FailedRows int `json:"failed_rows"`
Results []shared.TestResult `json:"results"`
Summary string `json:"summary"`
}
DataDrivenResult represents the outcome of the data-driven test run.
type DataLoader ¶
type DataLoader struct {
Source string
}
DataLoader loads data from files or generates fake data.
type TemplateEngine ¶
type TemplateEngine struct{}
TemplateEngine replaces placeholders in test scenarios with actual data.
func (*TemplateEngine) Populate ¶
func (e *TemplateEngine) Populate(template shared.TestScenario, data map[string]interface{}) shared.TestScenario
Populate replaces {{var}} placeholders in the scenario with values from the data row.
Click to show internal directories.
Click to hide internal directories.