Documentation ¶
Index ¶
- Constants
- func ConvertToProtoItem(item Item) *gauge_messages.ProtoItem
- func ConvertToProtoSpec(spec *Specification) *gauge_messages.ProtoSpec
- func ConvertToProtoStepValue(stepValue *StepValue) *gauge_messages.ProtoStepValue
- func ConvertToProtoSuiteResult(suiteResult *result.SuiteResult) *gauge_messages.ProtoSuiteResult
- func NewProtoScenario(scenario *Scenario) *gauge_messages.ProtoScenario
- func NewSpecResult(specification *Specification) *result.SpecResult
- func UsesArgs(steps []*Step, args ...string) bool
- type ArgLookup
- func (lookup *ArgLookup) AddArgName(argName string)
- func (lookup *ArgLookup) AddArgValue(param string, stepArg *StepArg) error
- func (lookup *ArgLookup) ContainsArg(param string) bool
- func (lookup *ArgLookup) FromDataTable(datatable *Table) *ArgLookup
- func (lookup *ArgLookup) FromDataTableRow(datatable *Table, index int) (*ArgLookup, error)
- func (lookup *ArgLookup) GetArg(param string) (*StepArg, error)
- func (lookup *ArgLookup) GetCopy() (*ArgLookup, error)
- func (lookup ArgLookup) String() string
- type ArgType
- type BuildErrors
- type ByLineNo
- type Comment
- type Concept
- type ConceptDictionary
- type DataTable
- type Heading
- type HeadingType
- type Item
- type ItemProcessor
- type ItemQueue
- type Scenario
- func (scenario *Scenario) AddComment(comment *Comment)
- func (scenario *Scenario) AddHeading(heading *Heading)
- func (scenario *Scenario) AddItem(itemToAdd Item)
- func (scenario *Scenario) AddStep(step *Step)
- func (scenario *Scenario) AddTags(tags *Tags)
- func (scenario *Scenario) InSpan(lineNumber int) bool
- func (scenario Scenario) Kind() TokenKind
- func (scenario *Scenario) LatestStep() *Step
- func (scenario *Scenario) NTags() int
- func (scenario *Scenario) UsesArgsInSteps(args ...string) bool
- type Span
- type SpecCollection
- type SpecItemFilter
- type Specification
- func (spec *Specification) AddComment(comment *Comment)
- func (spec *Specification) AddContext(contextStep *Step)
- func (spec *Specification) AddDataTable(table *Table)
- func (spec *Specification) AddExternalDataTable(externalTable *DataTable)
- func (spec *Specification) AddHeading(heading *Heading)
- func (spec *Specification) AddItem(itemToAdd Item)
- func (spec *Specification) AddScenario(scenario *Scenario)
- func (spec *Specification) AddTags(tags *Tags)
- func (spec *Specification) AllItems() (items []Item)
- func (spec *Specification) Filter(filter SpecItemFilter)
- func (spec *Specification) GetSpecItems() []Item
- func (spec *Specification) Kind() TokenKind
- func (spec *Specification) LatestContext() *Step
- func (spec *Specification) LatestScenario() *Scenario
- func (spec *Specification) LatestTeardown() *Step
- func (spec *Specification) NTags() int
- func (spec *Specification) PopulateConceptLookup(lookup *ArgLookup, conceptArgs []*StepArg, stepArgs []*StepArg) error
- func (spec *Specification) ProcessConceptStepsFrom(conceptDictionary *ConceptDictionary) error
- func (spec *Specification) RenameSteps(oldStep Step, newStep Step, orderMap map[int]int) bool
- func (spec *Specification) Traverse(processor ItemProcessor, queue *ItemQueue)
- func (spec *Specification) UsesArgsInContextTeardown(args ...string) bool
- type Step
- func (step *Step) AddArgs(args ...*StepArg)
- func (step *Step) AddInlineTableHeaders(headers []string)
- func (step *Step) AddInlineTableRow(row []TableCell)
- func (step *Step) CopyFrom(another *Step)
- func (step *Step) GetArg(name string) (*StepArg, error)
- func (step *Step) GetCopy() (*Step, error)
- func (step *Step) GetFragments() []*gauge_messages.Fragment
- func (step *Step) GetLineText() string
- func (step *Step) InConcept() bool
- func (step Step) Kind() TokenKind
- func (step *Step) PopulateFragments()
- func (step *Step) Rename(oldStep Step, newStep Step, isRefactored bool, orderMap map[int]int, ...) bool
- func (step *Step) ReplaceArgsWithDynamic(args []*StepArg)
- func (step *Step) UsesDynamicArgs(args ...string) bool
- type StepArg
- type StepValue
- type Table
- func (table *Table) AddHeaders(columnNames []string)
- func (table *Table) AddRowValues(rowValues []string)
- func (table *Table) Get(header string) ([]TableCell, error)
- func (table *Table) GetDynamicArgs() []string
- func (table *Table) GetRowCount() int
- func (table *Table) IsInitialized() bool
- func (table *Table) Kind() TokenKind
- func (table *Table) Rows() [][]string
- func (table *Table) String() string
- type TableCell
- type Tags
- type TearDown
- type TokenKind
Constants ¶
View Source
const ( SpecHeading = 0 ScenarioHeading = 1 )
Variables ¶
This section is empty.
Functions ¶
func ConvertToProtoItem ¶ added in v0.3.2
func ConvertToProtoItem(item Item) *gauge_messages.ProtoItem
func ConvertToProtoSpec ¶ added in v0.3.2
func ConvertToProtoSpec(spec *Specification) *gauge_messages.ProtoSpec
func ConvertToProtoStepValue ¶ added in v0.3.2
func ConvertToProtoStepValue(stepValue *StepValue) *gauge_messages.ProtoStepValue
func ConvertToProtoSuiteResult ¶ added in v0.3.2
func ConvertToProtoSuiteResult(suiteResult *result.SuiteResult) *gauge_messages.ProtoSuiteResult
func NewProtoScenario ¶ added in v0.3.2
func NewProtoScenario(scenario *Scenario) *gauge_messages.ProtoScenario
func NewSpecResult ¶ added in v0.3.2
func NewSpecResult(specification *Specification) *result.SpecResult
Types ¶
type ArgLookup ¶ added in v0.3.2
type ArgLookup struct { //helps to access the index of an arg at O(1) ParamIndexMap map[string]int // contains filtered or unexported fields }
func (*ArgLookup) AddArgName ¶ added in v0.3.2
func (*ArgLookup) AddArgValue ¶ added in v0.3.2
func (*ArgLookup) ContainsArg ¶ added in v0.3.2
func (*ArgLookup) FromDataTable ¶ added in v0.3.2
create an empty lookup with only args to resolve dynamic params for steps
func (*ArgLookup) FromDataTableRow ¶ added in v0.3.2
type BuildErrors ¶ added in v0.8.0
type BuildErrors struct { SpecErrs map[*Specification][]error ScenarioErrs map[*Scenario][]error StepErrs map[*Step]error }
func NewBuildErrors ¶ added in v0.8.0
func NewBuildErrors() *BuildErrors
func (*BuildErrors) HasErrors ¶ added in v0.8.0
func (e *BuildErrors) HasErrors() bool
type ConceptDictionary ¶ added in v0.3.2
type ConceptDictionary struct { ConceptsMap map[string]*Concept // contains filtered or unexported fields }
func NewConceptDictionary ¶ added in v0.3.2
func NewConceptDictionary() *ConceptDictionary
func (*ConceptDictionary) Remove ¶ added in v0.9.6
func (dict *ConceptDictionary) Remove(stepValue string)
func (*ConceptDictionary) ReplaceNestedConceptSteps ¶ added in v0.3.2
func (dict *ConceptDictionary) ReplaceNestedConceptSteps(conceptStep *Step) error
func (*ConceptDictionary) Search ¶ added in v0.3.2
func (dict *ConceptDictionary) Search(stepValue string) *Concept
func (*ConceptDictionary) UpdateLookupForNestedConcepts ¶ added in v0.3.2
func (dict *ConceptDictionary) UpdateLookupForNestedConcepts() error
type DataTable ¶ added in v0.3.2
func (*DataTable) IsInitialized ¶ added in v0.3.2
type Heading ¶ added in v0.3.2
type Heading struct { Value string LineNo int HeadingType HeadingType }
type HeadingType ¶ added in v0.3.2
type HeadingType int
type ItemProcessor ¶ added in v0.9.0
type Scenario ¶ added in v0.3.2
type Scenario struct { Heading *Heading Steps []*Step Comments []*Comment Tags *Tags Items []Item DataTableRow Table DataTableRowIndex int Span *Span }
func (*Scenario) AddComment ¶ added in v0.3.2
func (*Scenario) AddHeading ¶ added in v0.3.2
func (*Scenario) LatestStep ¶ added in v0.3.2
func (*Scenario) UsesArgsInSteps ¶ added in v0.8.4
type SpecCollection ¶ added in v0.4.0
type SpecCollection struct {
// contains filtered or unexported fields
}
func NewSpecCollection ¶ added in v0.4.0
func NewSpecCollection(s []*Specification, groupDataTableSpecs bool) *SpecCollection
func (*SpecCollection) Add ¶ added in v0.4.0
func (s *SpecCollection) Add(spec *Specification)
func (*SpecCollection) HasNext ¶ added in v0.4.0
func (s *SpecCollection) HasNext() bool
func (*SpecCollection) Next ¶ added in v0.4.0
func (s *SpecCollection) Next() []*Specification
func (*SpecCollection) Size ¶ added in v0.4.0
func (s *SpecCollection) Size() int
func (*SpecCollection) SpecNames ¶ added in v0.4.0
func (s *SpecCollection) SpecNames() []string
func (*SpecCollection) Specs ¶ added in v0.4.0
func (s *SpecCollection) Specs() (specs []*Specification)
type SpecItemFilter ¶ added in v0.3.2
type Specification ¶ added in v0.3.2
type Specification struct { Heading *Heading Scenarios []*Scenario Comments []*Comment DataTable DataTable Contexts []*Step FileName string Tags *Tags Items []Item TearDownSteps []*Step }
func (*Specification) AddComment ¶ added in v0.3.2
func (spec *Specification) AddComment(comment *Comment)
func (*Specification) AddContext ¶ added in v0.3.2
func (spec *Specification) AddContext(contextStep *Step)
func (*Specification) AddDataTable ¶ added in v0.3.2
func (spec *Specification) AddDataTable(table *Table)
func (*Specification) AddExternalDataTable ¶ added in v0.3.2
func (spec *Specification) AddExternalDataTable(externalTable *DataTable)
func (*Specification) AddHeading ¶ added in v0.3.2
func (spec *Specification) AddHeading(heading *Heading)
func (*Specification) AddItem ¶ added in v0.3.2
func (spec *Specification) AddItem(itemToAdd Item)
func (*Specification) AddScenario ¶ added in v0.3.2
func (spec *Specification) AddScenario(scenario *Scenario)
func (*Specification) AddTags ¶ added in v0.3.2
func (spec *Specification) AddTags(tags *Tags)
func (*Specification) AllItems ¶ added in v0.9.0
func (spec *Specification) AllItems() (items []Item)
func (*Specification) Filter ¶ added in v0.3.2
func (spec *Specification) Filter(filter SpecItemFilter)
func (*Specification) GetSpecItems ¶ added in v0.3.2
func (spec *Specification) GetSpecItems() []Item
func (*Specification) Kind ¶ added in v0.5.0
func (spec *Specification) Kind() TokenKind
func (*Specification) LatestContext ¶ added in v0.3.2
func (spec *Specification) LatestContext() *Step
func (*Specification) LatestScenario ¶ added in v0.3.2
func (spec *Specification) LatestScenario() *Scenario
func (*Specification) LatestTeardown ¶ added in v0.3.2
func (spec *Specification) LatestTeardown() *Step
func (*Specification) NTags ¶ added in v0.5.0
func (spec *Specification) NTags() int
func (*Specification) PopulateConceptLookup ¶ added in v0.3.2
func (spec *Specification) PopulateConceptLookup(lookup *ArgLookup, conceptArgs []*StepArg, stepArgs []*StepArg) error
func (*Specification) ProcessConceptStepsFrom ¶ added in v0.3.2
func (spec *Specification) ProcessConceptStepsFrom(conceptDictionary *ConceptDictionary) error
func (*Specification) RenameSteps ¶ added in v0.3.2
func (*Specification) Traverse ¶ added in v0.3.2
func (spec *Specification) Traverse(processor ItemProcessor, queue *ItemQueue)
func (*Specification) UsesArgsInContextTeardown ¶ added in v0.8.4
func (spec *Specification) UsesArgsInContextTeardown(args ...string) bool
type Step ¶
type Step struct { LineNo int FileName string Value string LineText string Args []*StepArg IsConcept bool Lookup ArgLookup ConceptSteps []*Step Fragments []*gauge_messages.Fragment Parent *Step HasInlineTable bool Items []Item PreComments []*Comment Suffix string }
func (*Step) AddInlineTableHeaders ¶ added in v0.3.2
func (*Step) AddInlineTableRow ¶ added in v0.3.2
func (*Step) GetCopy ¶ added in v0.3.2
Not copying parent as it enters an infinite loop in case of nested concepts. This is because the steps under the concept are copied and their parent copying again comes back to copy the same concept.
func (*Step) GetFragments ¶ added in v0.5.0
func (step *Step) GetFragments() []*gauge_messages.Fragment
func (*Step) GetLineText ¶ added in v0.5.0
func (*Step) PopulateFragments ¶ added in v0.3.2
func (step *Step) PopulateFragments()
func (*Step) ReplaceArgsWithDynamic ¶ added in v0.3.2
func (*Step) UsesDynamicArgs ¶ added in v0.8.4
type Table ¶ added in v0.3.2
type Table struct { Columns [][]TableCell Headers []string LineNo int // contains filtered or unexported fields }
func (*Table) AddHeaders ¶ added in v0.3.2
func (*Table) AddRowValues ¶ added in v0.3.2
func (*Table) GetDynamicArgs ¶ added in v0.3.2
func (*Table) GetRowCount ¶ added in v0.3.2
func (*Table) IsInitialized ¶ added in v0.3.2
type TableCell ¶ added in v0.3.2
func GetDefaultTableCell ¶ added in v0.3.2
func GetDefaultTableCell() TableCell
func GetTableCell ¶ added in v0.3.2
Click to show internal directories.
Click to hide internal directories.