formatter

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

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) Pickle

func (f *Formatter) Pickle(pickle *messages.Pickle)

Pickle is called when a scenario starts

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.

Jump to

Keyboard shortcuts

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