scenarios

package
v2.14.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2022 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

Package scenarios contains all scenarios

Index

Constants

This section is empty.

Variables

View Source
var Sample = map[string]ScenarioGenerator{}

Sample contains all scenarios

View Source
var ScreenshotOnError = false

ScreenshotOnError if true, generate screenshot on error

View Source
var ScreenshotPath = "./screenshots"

ScreenshotPath path to save screenshots

View Source
var ScreenshotS3AccessKey = ""

ScreenshotS3AccessKey access key id to save screenshots

View Source
var ScreenshotS3Bucket = ""

ScreenshotS3Bucket bucket name to save screenshots

View Source
var ScreenshotS3Endpoint = ""

ScreenshotS3Endpoint endpoint url to save screenshots

View Source
var ScreenshotS3Prefix = ""

ScreenshotS3Prefix prefix to save screenshots

View Source
var ScreenshotS3Region = ""

ScreenshotS3Region region to save screenshots

View Source
var ScreenshotS3SecretKey = ""

ScreenshotS3SecretKey secret access key id to save screenshots

View Source
var ScreenshotS3TLS = true

ScreenshotS3TLS if true, use TLS to connect to S3

Functions

func Add

func Add(name string, scenario ScenarioGenerator)

Add new scenario

func AddScreenshotsToQueue

func AddScreenshotsToQueue(m *models.ScenarioResult, s models.Scenario, name, desc string)

AddScreenshotsToQueue add screenshots to queue

func CreateScreenshotWorker

func CreateScreenshotWorker(ctx context.Context, maxExecutor int)

CreateScreenshotWorker create a new worker to generate screenshots

func GenerateScreenshots

func GenerateScreenshots(m *models.ScenarioResult, s models.Scenario, name, desc string) error

GenerateScreenshots generate screenshots for scenario

func GetAll

func GetAll() map[string]ScenarioGenerator

GetAll scenarios

func InitializeScenario

func InitializeScenario(s models.Scenario) (models.IScenario, error)

InitializeScenario initialize a new scenario

func PrettyPrintScenarioResults

func PrettyPrintScenarioResults(m *models.ScenarioResult, name, desc string)

PrettyPrintScenarioResults Print scenario metrics

func PrettyPrintScenarioResults2String

func PrettyPrintScenarioResults2String(m *models.ScenarioResult, name, desc string) string

PrettyPrintScenarioResults2String Print scenario metrics

func RunIScenario

func RunIScenario(ctx context.Context, name, desc string, s models.Scenario, srunner models.IScenario) *models.ScenarioResult

RunIScenario run already initialize scenario

func RunScenario

func RunScenario(ctx context.Context, s models.Scenario, name, desc string) (*models.ScenarioResult, error)

RunScenario Run one scenario

Types

type ScenarioGenerator

type ScenarioGenerator func() models.IScenario

ScenarioGenerator interface

Directories

Path Synopsis
Package all runs all scenarios
Package all runs all scenarios
Package browser run tests in real browser
Package browser run tests in real browser
Package http is a http scenario
Package http is a http scenario
Package icmp implements a plugin that runs a traceroute and ping command
Package icmp implements a plugin that runs a traceroute and ping command

Jump to

Keyboard shortcuts

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