report

package
v0.16.8 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: AGPL-3.0 Imports: 17 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

func ScenarioStepResultToVerboseHttpRequestInfo(sr *types.ScenarioStepResult) verboseHttpRequestInfo

Types

type AssertInfo

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

type AssertionErrVerbose

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

type FailVerbose

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

type ItemReport

type ItemReport ScenarioStepResultSummary

ItemReport wraps ScenarioStepReport to add success/fails percentage values

type Report

type Report Result

Report wraps Result to add success/fails percentage values

type ReportService

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

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

type Result struct {
	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

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

type ScenarioStepResultSummary

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

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

type ServerErrVerbose

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