Documentation
¶
Index ¶
- func New(suiteName string, writer io.Writer) formatters.Formatter
- func NewTextFormatter(suite string, writer io.Writer) formatters.Formatter
- type Formatter
- func (f *Formatter) Ambiguous(pickle *messages.Pickle, step *messages.PickleStep, ...)
- func (f *Formatter) Defined(pickle *messages.Pickle, step *messages.PickleStep, ...)
- func (f *Formatter) Failed(pickle *messages.Pickle, step *messages.PickleStep, ...)
- func (f *Formatter) Feature(gherkinDocument *messages.GherkinDocument, uri string, content []byte)
- func (f *Formatter) Passed(pickle *messages.Pickle, step *messages.PickleStep, ...)
- func (f *Formatter) Pending(pickle *messages.Pickle, step *messages.PickleStep, ...)
- func (f *Formatter) Pickle(pickle *messages.Pickle)
- func (f *Formatter) Skipped(pickle *messages.Pickle, step *messages.PickleStep, ...)
- func (f *Formatter) Summary()
- func (f *Formatter) TestRunStarted()
- func (f *Formatter) Undefined(pickle *messages.Pickle, step *messages.PickleStep, ...)
- type TextFormatter
- func (f *TextFormatter) Ambiguous(pickle *messages.Pickle, step *messages.PickleStep, ...)
- func (f *TextFormatter) Defined(pickle *messages.Pickle, step *messages.PickleStep, ...)
- func (f *TextFormatter) Failed(pickle *messages.Pickle, step *messages.PickleStep, ...)
- func (f *TextFormatter) Feature(gherkinDocument *messages.GherkinDocument, uri string, content []byte)
- func (f *TextFormatter) Passed(pickle *messages.Pickle, step *messages.PickleStep, ...)
- func (f *TextFormatter) Pending(pickle *messages.Pickle, step *messages.PickleStep, ...)
- func (f *TextFormatter) Pickle(pickle *messages.Pickle)
- func (f *TextFormatter) Skipped(pickle *messages.Pickle, step *messages.PickleStep, ...)
- func (f *TextFormatter) Summary()
- func (f *TextFormatter) TestRunStarted()
- func (f *TextFormatter) Undefined(pickle *messages.Pickle, step *messages.PickleStep, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(suiteName string, writer io.Writer) formatters.Formatter
New creates a new formatter
func NewTextFormatter ¶
func NewTextFormatter(suite string, writer io.Writer) formatters.Formatter
NewTextFormatter creates a new TextFormatter.
Types ¶
type Formatter ¶
type Formatter struct {
// contains filtered or unexported fields
}
Formatter implements the custom InfraSpec formatter for Godog
func (*Formatter) Ambiguous ¶
func (f *Formatter) Ambiguous(pickle *messages.Pickle, step *messages.PickleStep, stepDef *formatters.StepDefinition, err error)
Ambiguous is called when a step is ambiguous
func (*Formatter) Defined ¶
func (f *Formatter) Defined(pickle *messages.Pickle, step *messages.PickleStep, stepDef *formatters.StepDefinition)
Defined is called when a step is defined and ready to execute
func (*Formatter) Failed ¶
func (f *Formatter) Failed(pickle *messages.Pickle, step *messages.PickleStep, stepDef *formatters.StepDefinition, err error)
Failed is called when a step fails
func (*Formatter) Feature ¶
func (f *Formatter) Feature(gherkinDocument *messages.GherkinDocument, uri string, content []byte)
Feature is called when a feature is encountered
func (*Formatter) Passed ¶
func (f *Formatter) Passed(pickle *messages.Pickle, step *messages.PickleStep, stepDef *formatters.StepDefinition)
Passed is called when a step passes
func (*Formatter) Pending ¶
func (f *Formatter) Pending(pickle *messages.Pickle, step *messages.PickleStep, stepDef *formatters.StepDefinition)
Pending is called when a step is pending
func (*Formatter) Skipped ¶
func (f *Formatter) Skipped(pickle *messages.Pickle, step *messages.PickleStep, stepDef *formatters.StepDefinition)
Skipped is called when a step is skipped
func (*Formatter) Summary ¶
func (f *Formatter) Summary()
Summary is called when the test run finishes
func (*Formatter) TestRunStarted ¶
func (f *Formatter) TestRunStarted()
TestRunStarted is called when the test run starts
func (*Formatter) Undefined ¶
func (f *Formatter) Undefined(pickle *messages.Pickle, step *messages.PickleStep, stepDef *formatters.StepDefinition)
Undefined is called when a step is undefined
type TextFormatter ¶
type TextFormatter struct {
// contains filtered or unexported fields
}
TextFormatter implements a plain-text (Terraform-style) formatter suitable for CI logs.
func (*TextFormatter) Ambiguous ¶
func (f *TextFormatter) Ambiguous(pickle *messages.Pickle, step *messages.PickleStep, stepDef *formatters.StepDefinition, err error)
Ambiguous logs an ambiguous step.
func (*TextFormatter) Defined ¶
func (f *TextFormatter) Defined(pickle *messages.Pickle, step *messages.PickleStep, stepDef *formatters.StepDefinition)
Defined increments the step counter.
func (*TextFormatter) Failed ¶
func (f *TextFormatter) Failed(pickle *messages.Pickle, step *messages.PickleStep, stepDef *formatters.StepDefinition, err error)
Failed logs a failed step.
func (*TextFormatter) Feature ¶
func (f *TextFormatter) Feature(gherkinDocument *messages.GherkinDocument, uri string, content []byte)
Feature prints the feature header.
func (*TextFormatter) Passed ¶
func (f *TextFormatter) Passed(pickle *messages.Pickle, step *messages.PickleStep, stepDef *formatters.StepDefinition)
Passed logs a passed step.
func (*TextFormatter) Pending ¶
func (f *TextFormatter) Pending(pickle *messages.Pickle, step *messages.PickleStep, stepDef *formatters.StepDefinition)
Pending logs a pending step.
func (*TextFormatter) Pickle ¶
func (f *TextFormatter) Pickle(pickle *messages.Pickle)
Pickle prints the scenario header.
func (*TextFormatter) Skipped ¶
func (f *TextFormatter) Skipped(pickle *messages.Pickle, step *messages.PickleStep, stepDef *formatters.StepDefinition)
Skipped logs a skipped step.
func (*TextFormatter) Summary ¶
func (f *TextFormatter) Summary()
Summary prints the summary after completion.
func (*TextFormatter) TestRunStarted ¶
func (f *TextFormatter) TestRunStarted()
TestRunStarted is called when test run begins.
func (*TextFormatter) Undefined ¶
func (f *TextFormatter) Undefined(pickle *messages.Pickle, step *messages.PickleStep, stepDef *formatters.StepDefinition)
Undefined logs an undefined step.