Documentation
¶
Index ¶
- func RegisterSuites(suites []TestSuite)
- type AsyncHookCallback
- type AsyncTestFinishedListener
- type AsyncTestSuiteFinishedListener
- type Hook
- type Option
- type Server
- type T
- func (t *T) Attempt() int
- func (t *T) Cleanup(c func())
- func (t *T) Context() context.Context
- func (t *T) Error(args ...any)
- func (t *T) Errorf(format string, args ...any)
- func (t *T) Fail()
- func (t *T) FailNow()
- func (t *T) Failed() bool
- func (t *T) Fatal(args ...any)
- func (t *T) Fatalf(format string, args ...any)
- func (t *T) Helper()
- func (t *T) Log(args ...any)
- func (t *T) Logf(format string, args ...any)
- func (t *T) Name() string
- func (t *T) Result() model.Result
- func (t *T) SetTimeout(timeout time.Duration)
- func (t *T) SetValue(key string, value any)
- func (t *T) Setenv(key, value string)
- func (t *T) Skip(args ...any)
- func (t *T) SkipNow()
- func (t *T) Skipf(format string, args ...any)
- func (t *T) Skipped() bool
- func (t *T) SoftFailure()
- func (t *T) StartSpan(name string, kv ...any) *model.Span
- func (t *T) TempDir() string
- func (t *T) Value(key string) any
- type TB
- type TestContext
- type TestFinishedListener
- type TestFunc
- type TestSuite
- type TestSuiteFinishedListener
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterSuites ¶
func RegisterSuites(suites []TestSuite)
Register registers test suites and schedules for the handoff server. Has to be called before `handoff.New()` to take effect.
Types ¶
type AsyncHookCallback ¶
AsyncHookCallback allows async hooks to add additional context to a testsuite or testrun.
type AsyncTestFinishedListener ¶
type AsyncTestFinishedListener interface {
Hook
TestFinishedAsync(suite model.TestSuite, run model.TestSuiteRun, testName string, context map[string]any, callback AsyncHookCallback)
}
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) Run ¶
Run runs the server with the passed in flags. Usually you want to pass in `os.Args` here.
func (*Server) ServerPort ¶
ServerPort returns the port that the server is using. This is useful when the port is randomly allocated on startup.
func (*Server) WaitForStartup ¶
func (s *Server) WaitForStartup()
WaitForStartup blocks until the server has started up.
type T ¶
type T struct {
// contains filtered or unexported fields
}
func (*T) SetTimeout ¶
func (*T) SoftFailure ¶
func (t *T) SoftFailure()
type TestContext ¶
type TestContext = model.TestContext
type TestFinishedListener ¶
type TestFinishedListener interface {
Hook
TestFinished(suite model.TestSuite, run model.TestSuiteRun, testName string, context model.TestContext)
}
type TestSuite ¶
type TestSuite struct {
// Name of the testsuite
Name string `json:"name"`
// Namespace allows grouping of test suites, e.g. by team name.
Namespace string
MaxTestAttempts int
Description string
Setup func() error
Teardown func() error
Timeout time.Duration
Tests []TestFunc
}
TestSuite represents the external view of the Testsuite to allow users of the library to omit passing in redundant information like the name of the test which can be retrieved via reflection.. It is only used by the caller of the library and then mapped internally to enrich the struct with e.g. test function names.
type TestSuiteFinishedListener ¶
type TestSuiteFinishedListener interface {
Hook
TestSuiteFinished(suite model.TestSuite, run model.TestSuiteRun)
}
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
example-server-bootstrap
command
|
|
|
k8s-operator
command
|
|
|
transformcli
command
handoff transform is a planned tool that automatically transforms handoff tests via go:generate into tests that can be run by the go standard toolchain but includes support for plugins and test suite setup/teardown.
|
handoff transform is a planned tool that automatically transforms handoff tests via go:generate into tests that can be run by the go standard toolchain but includes support for plugins and test suite setup/teardown. |
|
internal
|
|
|
html
templ: version: v0.3.833
|
templ: version: v0.3.833 |
|
html/component
templ: version: v0.3.833
|
templ: version: v0.3.833 |
|
model
The `model`s package is very atypical for projects written in go, but unfortunately cannot be avoided as it helps to avoid cyclic dependencies.
|
The `model`s package is very atypical for projects written in go, but unfortunately cannot be avoided as it helps to avoid cyclic dependencies. |