Documentation ¶
Overview ¶
Package scenarios contains all scenarios
Index ¶
- Variables
- func Add(name string, scenario ScenarioGenerator)
- func AddScreenshotsToQueue(m *models.ScenarioResult, s models.Scenario, name, desc string)
- func CreateScreenshotWorker(ctx context.Context, maxExecutor int)
- func GenerateScreenshots(m *models.ScenarioResult, s models.Scenario, name, desc string) error
- func GetAll() map[string]ScenarioGenerator
- func InitializeScenario(s models.Scenario) (models.IScenario, error)
- func PrettyPrintScenarioResults(m *models.ScenarioResult, name, desc string)
- func PrettyPrintScenarioResults2String(m *models.ScenarioResult, name, desc string) string
- func RunIScenario(ctx context.Context, name, desc string, s models.Scenario, ...) *models.ScenarioResult
- func RunScenario(ctx context.Context, s models.Scenario, name, desc string) (*models.ScenarioResult, error)
- type ScenarioGenerator
Constants ¶
This section is empty.
Variables ¶
var Sample = map[string]ScenarioGenerator{}
Sample contains all scenarios
var ScreenshotOnError = false
ScreenshotOnError if true, generate screenshot on error
var ScreenshotPath = "./screenshots"
ScreenshotPath path to save screenshots
var ScreenshotS3AccessKey = ""
ScreenshotS3AccessKey access key id to save screenshots
var ScreenshotS3Bucket = ""
ScreenshotS3Bucket bucket name to save screenshots
var ScreenshotS3Endpoint = ""
ScreenshotS3Endpoint endpoint url to save screenshots
var ScreenshotS3Prefix = ""
ScreenshotS3Prefix prefix to save screenshots
var ScreenshotS3Region = ""
ScreenshotS3Region region to save screenshots
var ScreenshotS3SecretKey = ""
ScreenshotS3SecretKey secret access key id to save screenshots
var ScreenshotS3TLS = true
ScreenshotS3TLS if true, use TLS to connect to S3
Functions ¶
func AddScreenshotsToQueue ¶
func AddScreenshotsToQueue(m *models.ScenarioResult, s models.Scenario, name, desc string)
AddScreenshotsToQueue add screenshots to queue
func CreateScreenshotWorker ¶
CreateScreenshotWorker create a new worker to generate screenshots
func GenerateScreenshots ¶
GenerateScreenshots generate screenshots for scenario
func InitializeScenario ¶
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 ¶
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 |