Documentation ¶
Index ¶
- func NewBootstrapFormatterFunc(s *config.Settings) godog.FormatterFunc
- func NewCompositeFormatterFunc(formatters []string) godog.FormatterFunc
- func NewCucumberFormatterFunc(s *config.Settings) godog.FormatterFunc
- func NewSimpleFormatterFunc(s *config.Settings) godog.FormatterFunc
- type BootstrapFormat
- func (b *BootstrapFormat) Defined(s *gherkin.Step, sd *godog.StepDef)
- func (b *BootstrapFormat) Failed(s *gherkin.Step, sd *godog.StepDef, err error)
- func (b *BootstrapFormat) Feature(f *gherkin.Feature, p string, src []byte)
- func (b *BootstrapFormat) Node(n interface{})
- func (b *BootstrapFormat) Passed(s *gherkin.Step, sd *godog.StepDef)
- func (b *BootstrapFormat) Pending(s *gherkin.Step, sd *godog.StepDef)
- func (b *BootstrapFormat) Skipped(s *gherkin.Step, sd *godog.StepDef)
- func (b *BootstrapFormat) Summary()
- func (b *BootstrapFormat) Undefined(s *gherkin.Step, sd *godog.StepDef)
- type CompositeFormat
- func (c *CompositeFormat) Defined(s *gherkin.Step, sd *godog.StepDef)
- func (c *CompositeFormat) Failed(s *gherkin.Step, sd *godog.StepDef, err error)
- func (c *CompositeFormat) Feature(ft *gherkin.Feature, p string, src []byte)
- func (c *CompositeFormat) Node(n interface{})
- func (c *CompositeFormat) Passed(s *gherkin.Step, sd *godog.StepDef)
- func (c *CompositeFormat) Pending(s *gherkin.Step, sd *godog.StepDef)
- func (c *CompositeFormat) Skipped(s *gherkin.Step, sd *godog.StepDef)
- func (c *CompositeFormat) Summary()
- func (c *CompositeFormat) Undefined(s *gherkin.Step, sd *godog.StepDef)
- type CucumberFormatter
- func (b *CucumberFormatter) Defined(s *gherkin.Step, sd *godog.StepDef)
- func (b *CucumberFormatter) Failed(s *gherkin.Step, sd *godog.StepDef, err error)
- func (b *CucumberFormatter) Feature(ft *gherkin.Feature, p string, c []byte)
- func (b *CucumberFormatter) Node(n interface{})
- func (b *CucumberFormatter) Passed(s *gherkin.Step, sd *godog.StepDef)
- func (b *CucumberFormatter) Pending(s *gherkin.Step, sd *godog.StepDef)
- func (b *CucumberFormatter) Skipped(s *gherkin.Step, sd *godog.StepDef)
- func (b *CucumberFormatter) Summary()
- func (b *CucumberFormatter) Undefined(s *gherkin.Step, sd *godog.StepDef)
- type CucumberReport
- type CukeComment
- type CukeDataTableRow
- type CukeDocstring
- type CukeElement
- type CukeEmbedding
- type CukeFeature
- type CukeMatch
- type CukeResult
- type CukeStep
- type CukeTag
- type SimpleFormat
- func (b *SimpleFormat) Defined(s *gherkin.Step, sd *godog.StepDef)
- func (b *SimpleFormat) Failed(s *gherkin.Step, sd *godog.StepDef, err error)
- func (b *SimpleFormat) Feature(f *gherkin.Feature, p string, src []byte)
- func (b *SimpleFormat) Node(n interface{})
- func (b *SimpleFormat) Passed(s *gherkin.Step, sd *godog.StepDef)
- func (b *SimpleFormat) Pending(s *gherkin.Step, sd *godog.StepDef)
- func (b *SimpleFormat) Skipped(s *gherkin.Step, sd *godog.StepDef)
- func (b *SimpleFormat) Summary()
- func (b *SimpleFormat) Undefined(s *gherkin.Step, sd *godog.StepDef)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBootstrapFormatterFunc ¶
func NewBootstrapFormatterFunc(s *config.Settings) godog.FormatterFunc
NewBootstrapFormatterFunc builds a new FormatterFunc to be used when registering BootstrapFormat with godog
func NewCompositeFormatterFunc ¶
func NewCompositeFormatterFunc(formatters []string) godog.FormatterFunc
NewCompositeFormatterFunc builds the formatter constructor function used by godog when registering this formatter
func NewCucumberFormatterFunc ¶
func NewCucumberFormatterFunc(s *config.Settings) godog.FormatterFunc
NewCucumberFormatterFunc builds a new FormatterFunc to be used when registering CucumberFormatter with godog
func NewSimpleFormatterFunc ¶
func NewSimpleFormatterFunc(s *config.Settings) godog.FormatterFunc
NewSimpleFormatterFunc builds a new FormatterFunc to be used when registering SimpleFormat with godog
Types ¶
type BootstrapFormat ¶
type BootstrapFormat struct {
CucumberFormatter
}
BootstrapFormat ...
func (*BootstrapFormat) Defined ¶
func (b *BootstrapFormat) Defined(s *gherkin.Step, sd *godog.StepDef)
Defined ...
func (*BootstrapFormat) Feature ¶
func (b *BootstrapFormat) Feature(f *gherkin.Feature, p string, src []byte)
Feature ...
func (*BootstrapFormat) Passed ¶
func (b *BootstrapFormat) Passed(s *gherkin.Step, sd *godog.StepDef)
Passed ...
func (*BootstrapFormat) Pending ¶
func (b *BootstrapFormat) Pending(s *gherkin.Step, sd *godog.StepDef)
Pending ...
type CompositeFormat ¶
type CompositeFormat struct {
// contains filtered or unexported fields
}
CompositeFormat allows using more than one formatter at a time
func (*CompositeFormat) Defined ¶
func (c *CompositeFormat) Defined(s *gherkin.Step, sd *godog.StepDef)
Defined calls the Defined functions on each formatter composing this CompositeFormat.
func (*CompositeFormat) Failed ¶
Failed calls the Failed functions on each formatter composing this CompositeFormat.
func (*CompositeFormat) Feature ¶
func (c *CompositeFormat) Feature(ft *gherkin.Feature, p string, src []byte)
Feature calls the Feature functions on each formatter composing this CompositeFormat.
func (*CompositeFormat) Node ¶
func (c *CompositeFormat) Node(n interface{})
Node calls the Node functions on each formatter composing this CompositeFormat.
func (*CompositeFormat) Passed ¶
func (c *CompositeFormat) Passed(s *gherkin.Step, sd *godog.StepDef)
Passed calls the Passed functions on each formatter composing this CompositeFormat.
func (*CompositeFormat) Pending ¶
func (c *CompositeFormat) Pending(s *gherkin.Step, sd *godog.StepDef)
Pending calls the Pending functions on each formatter composing this CompositeFormat.
func (*CompositeFormat) Skipped ¶
func (c *CompositeFormat) Skipped(s *gherkin.Step, sd *godog.StepDef)
Skipped calls the Skipped functions on each formatter composing this CompositeFormat.
func (*CompositeFormat) Summary ¶
func (c *CompositeFormat) Summary()
Summary calls the Summary functions on each formatter composing this CompositeFormat.
type CucumberFormatter ¶
type CucumberFormatter struct { CucumberReport Settings *config.Settings // contains filtered or unexported fields }
CucumberFormatter builds out a data structure that maps to Cucumber JSON format.
func NewCucumberFormatter ¶
func NewCucumberFormatter(s *config.Settings) CucumberFormatter
NewCucumberFormatter builds a new CucumberFormat struct
func (*CucumberFormatter) Defined ¶
func (b *CucumberFormatter) Defined(s *gherkin.Step, sd *godog.StepDef)
Defined ...
func (*CucumberFormatter) Feature ¶
func (b *CucumberFormatter) Feature(ft *gherkin.Feature, p string, c []byte)
Feature records a new Feature for the Bootstrap report
func (*CucumberFormatter) Node ¶
func (b *CucumberFormatter) Node(n interface{})
Node captures the Scenario or Outline that is the owner of the following steps
func (*CucumberFormatter) Passed ¶
func (b *CucumberFormatter) Passed(s *gherkin.Step, sd *godog.StepDef)
Passed records a passed step
func (*CucumberFormatter) Pending ¶
func (b *CucumberFormatter) Pending(s *gherkin.Step, sd *godog.StepDef)
Pending records steps that could not be matched to an implementation method
func (*CucumberFormatter) Skipped ¶
func (b *CucumberFormatter) Skipped(s *gherkin.Step, sd *godog.StepDef)
Skipped records a skipped step
func (*CucumberFormatter) Summary ¶
func (b *CucumberFormatter) Summary()
Summary indicates the end of the test
type CucumberReport ¶
type CucumberReport struct { Features []CukeFeature ProjectName string AppVersion string Environment string Browser string Platform string RunTime time.Duration OS string Timestamp string ElementsPassed int ElementsFailed int ElementsPending int StepsPassed int StepsFailed int StepsPending int StepsSkipped int TotalElements int TotalSteps int // contains filtered or unexported fields }
CucumberReport holds the jsonResults of a test execution
func NewCucumberReport ¶
func NewCucumberReport(s *config.Settings) CucumberReport
NewCucumberReport creates a new CucumberReport struct and initializes it.
type CukeComment ¶
CukeComment is any single-line comment.
type CukeDataTableRow ¶
type CukeDataTableRow struct {
Cells []string `json:"cells"`
}
CukeDataTableRow represents a row in a DataTable owned by a step
type CukeDocstring ¶
type CukeDocstring struct { Value string `json:"value"` ContentType string `json:"content_type"` Line int `json:"line"` }
CukeDocstring is a docstring (multi-line comment).
type CukeElement ¶
type CukeElement struct { ID string `json:"id"` Keyword string `json:"keyword"` Name string `json:"name"` Description string `json:"description"` Line int `json:"line"` Type string `json:"type"` Tags []CukeTag `json:"tags,omitempty"` Steps []CukeStep `json:"steps,omitempty"` StepsPassed int `json:"stepsPassed"` StepsFailed int `json:"stepsFailed"` StepsPending int `json:"stepsPending"` StepsSkipped int `json:"stepsSkipped"` }
CukeElement represents any block nested within a Feature:
- Background
- Scenario
- Scneario Outline
func (*CukeElement) GetTrimmedDescription ¶
func (e *CukeElement) GetTrimmedDescription() string
GetTrimmedDescription removes leading and trailing whitespace from the Scenario's description and returns the result.
func (*CukeElement) GetTrimmedKeyword ¶
func (e *CukeElement) GetTrimmedKeyword() string
GetTrimmedKeyword removes leading and trailing whitespace from the Scenario's keyword.
type CukeEmbedding ¶
CukeEmbedding is any file or binary content attached to a step.
type CukeFeature ¶
type CukeFeature struct { URI string `json:"uri"` ID string `json:"id"` Keyword string `json:"keyword"` Name string `json:"name"` Description string `json:"description"` Line int `json:"line"` Comments []CukeComment `json:"comments,omitempty"` Tags []CukeTag `json:"tags,omitempty"` Elements []CukeElement `json:"elements,omitempty"` ElementsPassed int `json:"elementsPassed"` ElementsFailed int `json:"elementsFailed"` ElementsPending int `json:"elementsPending"` StepsPassed int `json:"stepsPassed"` StepsFailed int `json:"stepsFailed"` StepsPending int `json:"stepsPending"` StepsSkipped int `json:"stepsSkipped"` }
CukeFeature is a single feature in JSONReport.
func (*CukeFeature) GetTrimmedDescription ¶
func (f *CukeFeature) GetTrimmedDescription() string
GetTrimmedDescription returns the features description after removing leading and trailing whitespace from each line.
type CukeMatch ¶
type CukeMatch struct {
Location string `json:"location"`
}
CukeMatch is the method matched to a step.
type CukeResult ¶
type CukeResult struct { Status string `json:"status"` Error string `json:"error_message,omitempty"` Duration *int `json:"duration,omitempty"` }
CukeResult is the result of executing a step.
func (*CukeResult) GetDurationInSeconds ¶
func (r *CukeResult) GetDurationInSeconds() string
GetDurationInSeconds convers the millisecond representation of duration to seconds (accurate to 2 decimal places) and returns the result.
type CukeStep ¶
type CukeStep struct { Keyword string `json:"keyword"` Name string `json:"name"` Line int `json:"line"` Docstring *CukeDocstring `json:"doc_string,omitempty"` Match CukeMatch `json:"match"` Result CukeResult `json:"result"` Embeddings []*CukeEmbedding `json:"embeddings,omitempty"` DataTable []*CukeDataTableRow `json:"rows,omitempty"` }
CukeStep is a single step in a cukeElement.
func (*CukeStep) GetTrimmedKeyword ¶
GetTrimmedKeyword removes leading and trailing whitespace from the Step's keyword.
func (*CukeStep) GetTrimmedName ¶
GetTrimmedName removes leading and trailing whitespace from the Step's name.
type SimpleFormat ¶
type SimpleFormat struct {
CucumberFormatter
}
SimpleFormat ...
func (*SimpleFormat) Defined ¶
func (b *SimpleFormat) Defined(s *gherkin.Step, sd *godog.StepDef)
Defined ...
func (*SimpleFormat) Feature ¶
func (b *SimpleFormat) Feature(f *gherkin.Feature, p string, src []byte)
Feature ...
func (*SimpleFormat) Passed ¶
func (b *SimpleFormat) Passed(s *gherkin.Step, sd *godog.StepDef)
Passed ...
func (*SimpleFormat) Pending ¶
func (b *SimpleFormat) Pending(s *gherkin.Step, sd *godog.StepDef)
Pending ...