executor

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SuiteRun

type SuiteRun struct {
	Id             string
	TestExecutor   string
	RunStage       string
	Service        string
	ServiceVersion string
	ServiceURL     string
	BenchRevision  string
	Attributes     map[string]string `json:"attributes"`
}

type SuiteRunSummary

type SuiteRunSummary struct {
	SuiteName         string
	SuiteRevision     string
	StartTime         time.Time
	Status            SuiteStatus
	TestsExecuted     int32
	TestsFailed       int32
	TestsFlaky        int32
	TestsPassed       int32
	TestsError        int32
	TotalDuration     time.Duration
	ScenariosDuration time.Duration
	TestRuns          []TestRunSummary
	Metrics           []metrics.Metric
	Attributes        map[string]string `json:"attributes"`
}

TestSuiteSummary summarizes the execution of a test suite

type SuiteStatus

type SuiteStatus string
const (
	SuitePassed SuiteStatus = "passed"
	SuiteFailed SuiteStatus = "failed"
)

type TestExecutor

type TestExecutor interface {
	// Name returns the name of the executor
	Name() string

	// ExecTestSuite executes a test suite an reports the results
	ExecTestSuite(
		ctx context.Context,
		suite TestSuite,
		env map[string]string,
	) (SuiteRunSummary, error)
}

TestExecutor defines the methods for running a test suite

type TestRunSummary

type TestRunSummary struct {
	TestFolder       string        `json:"testFolder"`
	TestFile         string        `json:"testFile"`
	StartTime        time.Time     `json:"startTime"`
	Status           TestStatus    `json:"status"`
	ExitMessage      string        `json:"exitMessage"`
	Iterations       string        `json:"iterations"`
	TotalDuration    time.Duration `json:"totalDuration"`
	ScenarioDuration time.Duration `json:"scenarioDuration"`
	// Attributes are provided by the test runner and not user configurable
	Attributes map[string]string `json:"attributes"`
}

TestRunSummary summarizes the execution of a test

type TestStatus

type TestStatus string
const (
	Unknown     TestStatus = ""
	TestPassed  TestStatus = "passed"
	TestFlaky   TestStatus = "flaky"
	TestFailed  TestStatus = "failed"
	TestError   TestStatus = "error"
	TestSkipped TestStatus = "skipped"
)

type TestSuite

type TestSuite struct {
	Name    string
	BaseDir string
	// Path to the test suite, relative to BaseDir
	Path     string
	Revision string
}

TestSuite defines the test suite

Directories

Path Synopsis
Package gobench implements a go benchmark test runner
Package gobench implements a go benchmark test runner
Package gotest implements a go test runner This code in inspired by https://github.com/tailscale/tailscale/blob/main/cmd/testwrapper/testwrapper.go
Package gotest implements a go test runner This code in inspired by https://github.com/tailscale/tailscale/blob/main/cmd/testwrapper/testwrapper.go

Jump to

Keyboard shortcuts

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