runner

package
v1.11.8-beta-03 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: MIT, MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateEnvFile

func CreateEnvFile(vars map[string]testkube.Variable) (string, error)

func MapTestSummaryToResults

func MapTestSummaryToResults(artilleryResult ArtilleryExecutionResult) testkube.ExecutionResult

MapTestSummaryToResults - map test results open-api format

Types

type ArtilleryExecutionResult

type ArtilleryExecutionResult struct {
	Output string
	Result ArtilleryTestResult
}

ArtilleryExecutionResult ...

type ArtilleryRunner

type ArtilleryRunner struct {
	Params  envs.Params
	Fetcher content.ContentFetcher
	Scraper scraper.Scraper
}

ArtilleryRunner ...

func NewArtilleryRunner

func NewArtilleryRunner(ctx context.Context, params envs.Params) (*ArtilleryRunner, error)

NewArtilleryRunner creates a new Testkube test runner for Artillery tests

func (*ArtilleryRunner) GetArtilleryExecutionResult

func (r *ArtilleryRunner) GetArtilleryExecutionResult(testReportFile string, out []byte) (ArtilleryExecutionResult, error)

GetArtilleryExecutionResult - fetch results from output report file

func (*ArtilleryRunner) GetType

func (r *ArtilleryRunner) GetType() runner.Type

GetType returns runner type

func (*ArtilleryRunner) Run

func (r *ArtilleryRunner) Run(ctx context.Context, execution testkube.Execution) (result testkube.ExecutionResult, err error)

Run ...

func (*ArtilleryRunner) Validate

func (r *ArtilleryRunner) Validate(execution testkube.Execution) error

Validate checks if Execution has valid data in context of Artillery executor

type ArtilleryTestResult

type ArtilleryTestResult struct {
	Aggregate    Metrics   `json:"aggregate"`
	Intermediate []Metrics `json:"intermediate"`
}

ArtilleryTestResult ...

type Counters

type Counters struct {
	VusersCreated                               int `json:"vusers.created"`
	HTTPRequests                                int `json:"http.requests"`
	HTTPCodes200                                int `json:"http.codes.200"`
	HTTPResponses                               int `json:"http.responses"`
	PluginsExpectOk                             int `json:"plugins.expect.ok"`
	PluginsExpectOkStatusCode                   int `json:"plugins.expect.ok.statusCode"`
	PluginsExpectOkContentType                  int `json:"plugins.expect.ok.contentType"`
	PluginsMetricsByEndpointGetRequestCodes200  int `json:"plugins.metrics-by-endpoint.getRequest.codes.200"`
	VusersFailed                                int `json:"vusers.failed"`
	VusersCompleted                             int `json:"vusers.completed"`
	PluginsMetricsByEndpointPostRequestCodes200 int `json:"plugins.metrics-by-endpoint.postRequest.codes.200"`
}

type HistogramMetrics

type HistogramMetrics struct {
	Mapping       Mapping `json:"mapping"`
	Store         Store   `json:"store"`
	NegativeStore Store   `json:"negativeStore"`
	ZeroCount     int     `json:"zeroCount"`
	Count         int     `json:"count"`
	Min           float64 `json:"min"`
	Max           float64 `json:"max"`
	Sum           float64 `json:"sum"`
}

HistogramMetrics ...

type Histograms

type Histograms struct {
	HTTPResponseTime                                HistogramMetrics `json:"http.response_time"`
	PluginsMetricsByEndpointResponseTimeGetRequest  HistogramMetrics `json:"plugins.metrics-by-endpoint.response_time.getRequest"`
	VusersSessionLength                             HistogramMetrics `json:"vusers.session_length"`
	PluginsMetricsByEndpointResponseTimePostRequest HistogramMetrics `json:"plugins.metrics-by-endpoint.response_time.postRequest"`
}

type Mapping

type Mapping struct {
	RelativeAccuracy float64 `json:"relativeAccuracy"`
	Offset           float64 `json:"_offset"`
	Gamma            float64 `json:"gamma"`
	Multiplier       float64 `json:"_multiplier"`
	MinPossible      float64 `json:"minPossible"`
	MaxPossible      float64 `json:"maxPossible"`
}

Mapping ...

type Metrics

type Metrics struct {
	Counters         Counters   `json:"counters"`
	Histograms       Histograms `json:"histograms"`
	HTTPRequestRate  float64    `json:"http.request_rate"`
	FirstCounterAt   float64    `json:"firstCounterAt"`
	FirstHistogramAt float64    `json:"firstHistogramAt"`
	LastCounterAt    float64    `json:"lastCounterAt"`
	LastHistogramAt  float64    `json:"lastHistogramAt"`
	FirstMetricAt    float64    `json:"firstMetricAt"`
	LastMetricAt     float64    `json:"lastMetricAt"`
	Summaries        Summaries  `json:"summaries"`
}

type Store

type Store struct {
	ChunkSize float64   `json:"chunkSize"`
	Bins      []float64 `json:"bins"`
	Count     float64   `json:"count"`
	MinKey    float64   `json:"minKey"`
	MaxKey    float64   `json:"maxKey"`
	Offset    float64   `json:"offset"`
}

Store ...

type Summaries

type Summaries struct {
	HTTPResponseTime                                Summary `json:"http.response_time"`
	PluginsMetricsByEndpointResponseTimeGetRequest  Summary `json:"plugins.metrics-by-endpoint.response_time.getRequest"`
	VusersSessionLength                             Summary `json:"vusers.session_length"`
	PluginsMetricsByEndpointResponseTimePostRequest Summary `json:"plugins.metrics-by-endpoint.response_time.postRequest"`
}

type Summary

type Summary struct {
	Min    float64 `json:"min"`
	Max    float64 `json:"max"`
	Count  float64 `json:"count"`
	P50    float64 `json:"p50"`
	Median float64 `json:"median"`
	P75    float64 `json:"p75"`
	P90    float64 `json:"p90"`
	P95    float64 `json:"p95"`
	P99    float64 `json:"p99"`
	P999   float64 `json:"p999"`
}

Summary ...

Jump to

Keyboard shortcuts

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