Documentation
¶
Overview ¶
Package core contains fundamental things related to tests
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecuteTests ¶
func ExecuteTests(tests Tests, progressReadInterval time.Duration, executor TestExecutor)
ExecuteTests executes all test and calls callbacks
Types ¶
type Test ¶
type Test interface {
// Name returns uniq name of the test
Name() string
// Start starts execution of the test
Start()
// Done returns true only if test execution ended
Done() bool
// Progress returns current progress of test execution in range [0,1]
Progress() float64
}
Test represents test that can be executed
type TestExecutor ¶ added in v0.1.3
type TestExecutor interface {
// OnExecutionStart called before execution is started
OnExecutionStart(count int)
// OnExecutionEnd called after execution is ended
OnExecutionEnd(duration time.Duration)
// OnTestStart called before test is started
OnTestStart(name string, index int)
// OnTestProgress called every time progress updates
OnTestProgress(progress float64)
// OnTestEnd called after test is ended
OnTestEnd(duration time.Duration)
}
TestExecutor represents handler of test execution
Click to show internal directories.
Click to hide internal directories.