report

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const OutputTypeStdout = "stdout"
View Source
const OutputTypeStdoutJson = "stdout-json"

Variables

View Source
var AvailableOutputServices = make(map[string]ReportService)

Functions

func ScenarioStepResultToVerboseHttpRequestInfo added in v0.10.0

func ScenarioStepResultToVerboseHttpRequestInfo(sr *types.ScenarioStepResult) verboseHttpRequestInfo

Types

type AssertInfo added in v0.14.0

type AssertInfo struct {
	Count    int
	Received map[string][]interface{}
	Reason   string
}

type AssertionErrVerbose added in v0.14.0

type AssertionErrVerbose struct {
	Count      int64                  `json:"count"`
	Conditions map[string]*AssertInfo `json:"conditions"`
}

type FailVerbose added in v0.14.0

type FailVerbose struct {
	Count              int64               `json:"count"`
	AssertionErrorDist AssertionErrVerbose `json:"assertions"`
	ServerErrorDist    ServerErrVerbose    `json:"server"`
}

type ItemReport added in v0.7.1

type ItemReport ScenarioStepResultSummary

ItemReport wraps ScenarioStepReport to add success/fails percentage values

type Report added in v0.7.1

type Report Result

Report wraps Result to add success/fails percentage values

type ReportService

type ReportService interface {
	DoneChan() <-chan bool
	Init(debug bool, samplingRate int) error
	Start(input chan *types.ScenarioResult, assertionResultChan <-chan assertion.TestAssertionResult)
}

ReportService is the interface that abstracts different report implementations.

func NewReportService

func NewReportService(s string) (service ReportService, err error)

NewReportService is the factory method of the ReportService.

type Result added in v0.7.1

type Result struct {
	TestStatus           string                                `json:"test_status"`
	TestFailedAssertions []assertion.FailedRule                `json:"failed_criterias"`
	SuccessCount         int64                                 `json:"success_count"`
	ServerFailedCount    int64                                 `json:"server_fail_count"`
	AssertionFailCount   int64                                 `json:"assertion_fail_count"`
	AvgDuration          float32                               `json:"avg_duration"`
	StepResults          map[uint16]*ScenarioStepResultSummary `json:"steps"`
}

Total test result, all scenario iterations combined

func (Result) MarshalJSON added in v0.7.1

func (r Result) MarshalJSON() ([]byte, error)

type ScenarioStepResultSummary added in v0.10.0

type ScenarioStepResultSummary struct {
	Name           string             `json:"name"`
	StatusCodeDist map[int]int        `json:"status_code_dist"`
	Fail           FailVerbose        `json:"fail"`
	Durations      map[string]float32 `json:"durations"`
	SuccessCount   int64              `json:"success_count"`
}

func (ScenarioStepResultSummary) MarshalJSON added in v0.10.0

func (s ScenarioStepResultSummary) MarshalJSON() ([]byte, error)

type ServerErrVerbose added in v0.14.0

type ServerErrVerbose struct {
	Count   int64          `json:"count"`
	Reasons map[string]int `json:"reasons"`
}

Jump to

Keyboard shortcuts

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