executor

package
v0.0.0-...-f96b470 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package executor contains the test executor app.

Index

Constants

View Source
const (
	TestTypeHTTP testType = "http"
)

Different test types.

Variables

View Source
var (
	ErrCreateExecutor = fmt.Errorf("unable to create test executor")
)

error definitions.

Functions

This section is empty.

Types

type App

type App interface {
	Play() (*http.ExecuteResult, error)
}

App is the interface for the test executor app.

func New

func New(name string, opts ...Opts) (App, error)

New creates a new test executor app.

type Opts

type Opts func(*options)

Opts is a function for setting options on a test exectuor.

func WithLogger

func WithLogger(logger *slog.Logger) Opts

WithLogger sets the logger to use for the scenario.

func WithReader

func WithReader(reader io.Reader) Opts

WithReader sets the reader to use for the scenario.

type TestSpec

type TestSpec struct {
	Version   string
	Type      testType
	Variables []*Variable
}

TestSpec for a single test scenario.

type Variable

type Variable struct {
	Name  string
	Value string
}

Variable for a single test definition.

Directories

Path Synopsis
Package http contains the HTTP/REST test scenario implementation.
Package http contains the HTTP/REST test scenario implementation.
Package replacer provides a Replacer interface that replaces a string with a new string.
Package replacer provides a Replacer interface that replaces a string with a new string.
Package yaml presents the domain model for the YAML format representing test scenarios.
Package yaml presents the domain model for the YAML format representing test scenarios.

Jump to

Keyboard shortcuts

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