tester

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActorAPI

type ActorAPI struct {
	HTTPClient   *http.Client
	HTTPLastResp HTTPResponse

	HTTPBaseHost url.URL
	HTTPHeaders  map[string]string
	HTTPQuery    map[string]string
	HTTPPath     []string
	Payload      string

	Storage map[string]string

	StressConcurrentRequests      uint32
	StressConcurrentRequestsDelay time.Duration

	Metrics *metrics.Collector
}

ActorAPI container context

func NewActorAPI

func NewActorAPI() *ActorAPI

NewActorAPI context

func (*ActorAPI) AddQueryRequestParamFromStoredKey added in v0.3.2

func (a *ActorAPI) AddQueryRequestParamFromStoredKey(param, key string) error

func (*ActorAPI) AddQueryRequestParamWithValue added in v0.3.2

func (a *ActorAPI) AddQueryRequestParamWithValue(param, value string) error

func (*ActorAPI) AddQueryRequestParams added in v0.3.2

func (a *ActorAPI) AddQueryRequestParams(dt *godog.Table) error

func (*ActorAPI) HandleHTTPRequest added in v0.3.3

func (a *ActorAPI) HandleHTTPRequest(method, endpointPath string, payload io.Reader) (failedReason error)

HandleHTTPRequest ...

func (*ActorAPI) IAddURLPath

func (a *ActorAPI) IAddURLPath(path string) error

func (*ActorAPI) IAddURLPathByStoredKey

func (a *ActorAPI) IAddURLPathByStoredKey(key string) error

func (*ActorAPI) ICreatePayload

func (a *ActorAPI) ICreatePayload(rawPayload string) error

func (*ActorAPI) ICreatePayloadWithValue

func (a *ActorAPI) ICreatePayloadWithValue(payloadTemplate, key string) error

func (*ActorAPI) ISendPreBuiltRequestWithPath

func (a *ActorAPI) ISendPreBuiltRequestWithPath(method, endpoint string) error

func (*ActorAPI) ISendPreBuiltRequestWithPathAndPayload

func (a *ActorAPI) ISendPreBuiltRequestWithPathAndPayload(method, endpoint, payloadFile string) error

func (*ActorAPI) ISendPreBuiltRequestWithStoredPathAndPayload

func (a *ActorAPI) ISendPreBuiltRequestWithStoredPathAndPayload(method, endpoint string) error

func (*ActorAPI) ISendRequestWithPayload

func (a *ActorAPI) ISendRequestWithPayload(method, endpoint string, payloadFile string) error

func (*ActorAPI) ISendSimpleRequestTo

func (a *ActorAPI) ISendSimpleRequestTo(method, endpoint string) error

func (*ActorAPI) ISetHeaderWithValue

func (a *ActorAPI) ISetHeaderWithValue(name string, value string) error

func (*ActorAPI) IUseThisPayload

func (a *ActorAPI) IUseThisPayload(payloadTemplate string) error

func (*ActorAPI) IWaitSeconds

func (a *ActorAPI) IWaitSeconds(amount string) error

func (*ActorAPI) IWillUseThisBaseHostName

func (a *ActorAPI) IWillUseThisBaseHostName(base string) error

func (*ActorAPI) IWillUseThisBaseHostNameReadEnv

func (a *ActorAPI) IWillUseThisBaseHostNameReadEnv(hostEnv string) error

func (*ActorAPI) MetricsRequestDropIsLowerThan

func (a *ActorAPI) MetricsRequestDropIsLowerThan(p string) error

func (*ActorAPI) PrintLastResponse

func (a *ActorAPI) PrintLastResponse() error

func (*ActorAPI) PrintMetricsResult

func (a *ActorAPI) PrintMetricsResult() error

func (*ActorAPI) SaveToMemory added in v0.3.3

func (a *ActorAPI) SaveToMemory(key, value string)

SaveToMemory key and value in ActorAPI

func (*ActorAPI) SetConcurrentRequestsAmount

func (a *ActorAPI) SetConcurrentRequestsAmount(reqAmount, reqDelayMilliseconds string) error

func (*ActorAPI) TheResponseCodeShouldBe

func (a *ActorAPI) TheResponseCodeShouldBe(code int) error

func (*ActorAPI) TheResponseShouldBeEmpty

func (a *ActorAPI) TheResponseShouldBeEmpty() error

func (*ActorAPI) TheResponseShouldHaveValueInRegex

func (a *ActorAPI) TheResponseShouldHaveValueInRegex(expectedValue, regexPattern string) error

func (*ActorAPI) TheResponseShouldMatchJSON

func (a *ActorAPI) TheResponseShouldMatchJSON(body *godog.DocString) error

func (*ActorAPI) TheResponseShouldMatchJsonSchema

func (a *ActorAPI) TheResponseShouldMatchJsonSchema(path string) error

func (*ActorAPI) TheResponseShouldMatchRegex

func (a *ActorAPI) TheResponseShouldMatchRegex(regexPattern string) error

func (*ActorAPI) WhenCurrentTimeAfter

func (a *ActorAPI) WhenCurrentTimeAfter(clock string) error

func (*ActorAPI) WhenCurrentTimeBefore

func (a *ActorAPI) WhenCurrentTimeBefore(clock string) error

type HTTPResponse

type HTTPResponse struct {
	Body        []byte
	ResponseObj http.Response
}

HTTPResponse between actions

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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