runner

package
v4.0.0-alpha.7 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Runner

type Runner struct {
	// contains filtered or unexported fields
}

Runner 娴嬭瘯杩愯鍣?

func NewRunner

func NewRunner(opts ...RunnerOption) *Runner

NewRunner 鍒涘缓娴嬭瘯杩愯鍣?

func (*Runner) GetReport

func (r *Runner) GetReport() *TestReport

GetReport 鑾峰彇娴嬭瘯鎶ュ憡

func (*Runner) PrintReport

func (r *Runner) PrintReport()

PrintReport 鎵撳嵃娴嬭瘯鎶ュ憡

func (*Runner) Run

func (r *Runner) Run(ctx context.Context, server config.ServerConfig, user config.UserConfig) *TestReport

Run 杩愯鎵€鏈夋祴璇曞満鏅?

func (*Runner) SaveReport

func (r *Runner) SaveReport(path string) error

SaveReport 淇濆瓨娴嬭瘯鎶ュ憡

type RunnerOption

type RunnerOption func(*Runner)

RunnerOption 杩愯鍣ㄩ€夐」

func WithConfigDir

func WithConfigDir(dir string) RunnerOption

WithConfigDir 璁剧疆閰嶇疆鐩綍

func WithParallel

func WithParallel(maxParallel int) RunnerOption

WithParallel 璁剧疆骞惰娴嬭瘯

func WithScenarios

func WithScenarios(scenarios []config.TestScenario) RunnerOption

WithScenarios 璁剧疆娴嬭瘯鍦烘櫙

func WithTimeout

func WithTimeout(timeout time.Duration) RunnerOption

WithTimeout 璁剧疆瓒呮椂

type TestReport

type TestReport struct {
	Timestamp   time.Time    `json:"timestamp"`
	TotalTests  int          `json:"total_tests"`
	PassedTests int          `json:"passed_tests"`
	FailedTests int          `json:"failed_tests"`
	Results     []TestResult `json:"results"`
}

TestReport 娴嬭瘯鎶ュ憡

type TestResult

type TestResult struct {
	ScenarioName string        `json:"scenario_name"`
	ClientType   string        `json:"client_type"`
	Protocol     string        `json:"protocol"`
	TLS          string        `json:"tls"`
	Success      bool          `json:"success"`
	Duration     time.Duration `json:"duration"`
	Error        string        `json:"error,omitempty"`
	Latency      time.Duration `json:"latency,omitempty"`
	Logs         string        `json:"logs,omitempty"`
}

TestResult 娴嬭瘯缁撴灉

Jump to

Keyboard shortcuts

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