types

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestConfiguration

type TestConfiguration struct {
	Duration time.Duration
	Cooldown time.Duration
	Rate     vegeta.Rate
}

TestConfiguration

type TestOptions

type TestOptions struct {

	// The Test
	TestName string // name of the test. e.g. get-access-token
	Path     string // path of the endpoint. e.g. /api/v1/foo
	Method   string // HTTP Method
	Body     []byte // Only really used by generic test handlers
	Rate     vegeta.Rate
	Duration time.Duration

	// Test "Infrastructure"
	ID         string                                          // Unique UUID of a given test-suite execution.
	Handler    func(context.Context, *TestOptions) (err error) // Function which tests the given endpoint
	Attacker   *vegeta.Attacker
	Connection *sdk.Connection
	Encoder    *vegeta.Encoder // Encodes results and writes them to a File
	Logger     logging.Logger
}

TestOptions allows defining a test and all related test infrastructure in a way that can easily be executed by generic testing functions or providing a custom "handler" in the case of complex scenarios. It also eliminates sending a ton of arguments to each function.

Jump to

Keyboard shortcuts

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