Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GodogRunner ¶
type GodogRunner struct {
// contains filtered or unexported fields
}
GodogRunner acts as a wrapper around Godog allowing to maintain a global acceptance test state.
func NewGodogRunner ¶
func NewGodogRunner(opts ...GodogRunnerOption) *GodogRunner
NewGodogRunner returns a new Godog runner.
func (*GodogRunner) RegisterFeatureContext ¶
func (r *GodogRunner) RegisterFeatureContext(ctx func(s *godog.Suite))
RegisterFeatureContext registers a feature context
func (*GodogRunner) RegisterFeaturePath ¶
func (r *GodogRunner) RegisterFeaturePath(featurePath string)
RegisterFeaturePath registers a path where .feature files can be found.
func (*GodogRunner) Run ¶
func (r *GodogRunner) Run() int
type GodogRunnerOption ¶
type GodogRunnerOption func(*GodogRunner)
GodogRunnerOption sets an option on the Godog runner.
func WithGodogOptions ¶
func WithGodogOptions(o godog.Options) GodogRunnerOption
WithGodogOptions sets Godog options on the runner.
func WithSuiteName ¶
func WithSuiteName(s string) GodogRunnerOption
WithSuiteName sets Godog suite name on the runner.
type Runner ¶
type Runner interface { // Run executes the tests and returns with an exit code. Run() int }
Runner is the interface responsible for running tests implemented by testing.M.
func AppendRunner ¶
AppendRunner checks if the target runner is already a runner list and appends the runner to it. Otherwise it creates a runner list and appends both runners to it.
type RunnerFactory ¶
type RunnerFactory interface { // CreateRunner creates a test runner. CreateRunner() (Runner, error) }
RunnerFactory creates a new runner.
type RunnerFactoryFunc ¶
RunnerFactoryFunc wraps a function implementing the RunnerFactory interface.
func (RunnerFactoryFunc) CreateRunner ¶
func (fn RunnerFactoryFunc) CreateRunner() (Runner, error)
type RunnerFactoryRegistry ¶
type RunnerFactoryRegistry struct {
// contains filtered or unexported fields
}
RunnerFactoryRegistry accepts runner factory implementations and creates a runner list from them.
func (*RunnerFactoryRegistry) CreateRunner ¶
func (r *RunnerFactoryRegistry) CreateRunner() (Runner, error)
CreateRunner creates test runners from the underlying factories.
func (*RunnerFactoryRegistry) Register ¶
func (r *RunnerFactoryRegistry) Register(factory RunnerFactory)
Register appends a runner factory to the list. It is safe to call this method from multiple goroutines if necessary.