Documentation ¶
Index ¶
- func AddPostHook(result Result, executionResult *gauge_messages.ProtoExecutionResult)
- func AddPreHook(result Result, executionResult *gauge_messages.ProtoExecutionResult)
- func GetProtoHookFailure(executionResult *gauge_messages.ProtoExecutionResult) *(gauge_messages.ProtoHookFailure)
- type ConceptResult
- func (conceptResult *ConceptResult) AddPostHook(_ ...*gauge_messages.ProtoHookFailure)
- func (conceptResult *ConceptResult) AddPreHook(_ ...*gauge_messages.ProtoHookFailure)
- func (conceptResult *ConceptResult) ExecTime() int64
- func (conceptResult *ConceptResult) GetFailed() bool
- func (conceptResult *ConceptResult) GetPostHook() []*gauge_messages.ProtoHookFailure
- func (conceptResult *ConceptResult) GetPreHook() []*gauge_messages.ProtoHookFailure
- func (conceptResult *ConceptResult) GetRecoverable() bool
- func (conceptResult *ConceptResult) Item() interface{}
- func (conceptResult *ConceptResult) SetConceptExecResult(conceptExecResult *gauge_messages.ProtoStepExecutionResult)
- func (conceptResult *ConceptResult) SetFailure()
- func (conceptResult *ConceptResult) UpdateConceptExecResult()
- type ExecTimeTracker
- type Result
- type ScenarioResult
- func (s *ScenarioResult) AddContexts(contextProtoItems []*gauge_messages.ProtoItem)
- func (s *ScenarioResult) AddExecTime(execTime int64)
- func (s *ScenarioResult) AddItems(protoItems []*gauge_messages.ProtoItem)
- func (s *ScenarioResult) AddPostHook(f ...*gauge_messages.ProtoHookFailure)
- func (s *ScenarioResult) AddPreHook(f ...*gauge_messages.ProtoHookFailure)
- func (s *ScenarioResult) AddTearDownSteps(tearDownProtoItems []*gauge_messages.ProtoItem)
- func (s *ScenarioResult) ExecTime() int64
- func (s *ScenarioResult) GetFailed() bool
- func (s *ScenarioResult) GetPostHook() []*gauge_messages.ProtoHookFailure
- func (s *ScenarioResult) GetPreHook() []*gauge_messages.ProtoHookFailure
- func (s *ScenarioResult) Item() interface{}
- func (s *ScenarioResult) SetFailure()
- func (s *ScenarioResult) UpdateExecutionTime()
- type SpecResult
- func (specResult *SpecResult) AddExecTime(execTime int64)
- func (specResult *SpecResult) AddPostHook(f ...*gauge_messages.ProtoHookFailure)
- func (specResult *SpecResult) AddPreHook(f ...*gauge_messages.ProtoHookFailure)
- func (specResult *SpecResult) AddScenarioResults(scenarioResults []Result)
- func (specResult *SpecResult) AddSpecItems(resolvedItems []*gauge_messages.ProtoItem)
- func (specResult *SpecResult) AddTableRelatedScenarioResult(scenarioResults [][]Result, index int)
- func (specResult *SpecResult) ExecTime() int64
- func (specResult *SpecResult) GetFailed() bool
- func (specResult *SpecResult) GetPostHook() []*gauge_messages.ProtoHookFailure
- func (specResult *SpecResult) GetPreHook() []*gauge_messages.ProtoHookFailure
- func (specResult *SpecResult) Item() interface{}
- func (specResult *SpecResult) SetFailure()
- func (specResult *SpecResult) SetSkipped(skipped bool)
- type StepResult
- func (s *StepResult) AddExecTime(t int64)
- func (s *StepResult) AddPostHook(f ...*gauge_messages.ProtoHookFailure)
- func (s *StepResult) AddPreHook(f ...*gauge_messages.ProtoHookFailure)
- func (s *StepResult) ExecTime() int64
- func (s *StepResult) GetErrorMessage() string
- func (s *StepResult) GetFailed() bool
- func (s *StepResult) GetPostHook() []*gauge_messages.ProtoHookFailure
- func (s *StepResult) GetPreHook() []*gauge_messages.ProtoHookFailure
- func (s *StepResult) GetStackTrace() string
- func (s *StepResult) GetStepActualText() string
- func (s *StepResult) GetStepFailed() bool
- func (s *StepResult) Item() interface{}
- func (s *StepResult) ProtoStepExecResult() *gauge_messages.ProtoStepExecutionResult
- func (s *StepResult) SetFailure()
- func (s *StepResult) SetProtoExecResult(r *gauge_messages.ProtoExecutionResult)
- func (s *StepResult) SetStepFailure()
- type SuiteResult
- func (sr *SuiteResult) AddPostHook(f ...*gauge_messages.ProtoHookFailure)
- func (sr *SuiteResult) AddPreHook(f ...*gauge_messages.ProtoHookFailure)
- func (sr *SuiteResult) AddSpecResult(specResult *SpecResult)
- func (sr *SuiteResult) AddSpecResults(specResults []*SpecResult)
- func (sr *SuiteResult) AddUnhandledError(err error)
- func (sr *SuiteResult) ExecTime() int64
- func (sr *SuiteResult) GetFailed() bool
- func (sr *SuiteResult) GetPostHook() []*gauge_messages.ProtoHookFailure
- func (sr *SuiteResult) GetPreHook() []*gauge_messages.ProtoHookFailure
- func (sr *SuiteResult) Item() interface{}
- func (sr *SuiteResult) SetFailure()
- func (sr *SuiteResult) SetSpecsSkippedCount()
- func (sr *SuiteResult) UpdateExecTime(startTime time.Time)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddPostHook ¶
func AddPostHook(result Result, executionResult *gauge_messages.ProtoExecutionResult)
AddPostHook adds the after hook execution result to the actual result object
func AddPreHook ¶
func AddPreHook(result Result, executionResult *gauge_messages.ProtoExecutionResult)
AddPreHook adds the before hook execution result to the actual result object
func GetProtoHookFailure ¶
func GetProtoHookFailure(executionResult *gauge_messages.ProtoExecutionResult) *(gauge_messages.ProtoHookFailure)
GetProtoHookFailure returns the failure result of hook execution
Types ¶
type ConceptResult ¶ added in v0.5.0
type ConceptResult struct {
ProtoConcept *gauge_messages.ProtoConcept
}
ConceptResult represents result of a concept execution
func NewConceptResult ¶ added in v0.5.0
func NewConceptResult(con *gauge_messages.ProtoConcept) *ConceptResult
NewConceptResult creates a ConceptResult with given ProtoConcept
func (*ConceptResult) AddPostHook ¶ added in v0.8.4
func (conceptResult *ConceptResult) AddPostHook(_ ...*gauge_messages.ProtoHookFailure)
func (*ConceptResult) AddPreHook ¶ added in v0.8.4
func (conceptResult *ConceptResult) AddPreHook(_ ...*gauge_messages.ProtoHookFailure)
func (*ConceptResult) ExecTime ¶ added in v0.5.0
func (conceptResult *ConceptResult) ExecTime() int64
ExecTime returns the time taken for concept execution
func (*ConceptResult) GetFailed ¶ added in v0.5.0
func (conceptResult *ConceptResult) GetFailed() bool
GetFailed returns the state of the concept result
func (*ConceptResult) GetPostHook ¶ added in v0.5.0
func (conceptResult *ConceptResult) GetPostHook() []*gauge_messages.ProtoHookFailure
func (*ConceptResult) GetPreHook ¶ added in v0.5.0
func (conceptResult *ConceptResult) GetPreHook() []*gauge_messages.ProtoHookFailure
func (*ConceptResult) GetRecoverable ¶ added in v0.6.0
func (conceptResult *ConceptResult) GetRecoverable() bool
GetRecoverable returns the state of the concept result
func (*ConceptResult) Item ¶ added in v0.5.0
func (conceptResult *ConceptResult) Item() interface{}
func (*ConceptResult) SetConceptExecResult ¶ added in v0.5.0
func (conceptResult *ConceptResult) SetConceptExecResult(conceptExecResult *gauge_messages.ProtoStepExecutionResult)
SetConceptExecResult sets the conceptExecResult as result of concept execution as well as result of ConceptStep
func (*ConceptResult) SetFailure ¶ added in v0.5.0
func (conceptResult *ConceptResult) SetFailure()
SetFailure sets the conceptResult as failed
func (*ConceptResult) UpdateConceptExecResult ¶ added in v0.5.0
func (conceptResult *ConceptResult) UpdateConceptExecResult()
UpdateConceptExecResult sets the result of Concept execution
type ExecTimeTracker ¶
type ExecTimeTracker interface {
AddExecTime(int64)
}
ExecTimeTracker is an interface for tracking execution time
type Result ¶
type Result interface { GetPreHook() []*gauge_messages.ProtoHookFailure GetPostHook() []*gauge_messages.ProtoHookFailure GetFailed() bool AddPreHook(...*gauge_messages.ProtoHookFailure) AddPostHook(...*gauge_messages.ProtoHookFailure) SetFailure() Item() interface{} ExecTime() int64 }
Result represents execution result
type ScenarioResult ¶
type ScenarioResult struct {
ProtoScenario *gauge_messages.ProtoScenario
}
func NewScenarioResult ¶ added in v0.5.0
func NewScenarioResult(sce *gauge_messages.ProtoScenario) *ScenarioResult
func (*ScenarioResult) AddContexts ¶
func (s *ScenarioResult) AddContexts(contextProtoItems []*gauge_messages.ProtoItem)
func (*ScenarioResult) AddExecTime ¶
func (s *ScenarioResult) AddExecTime(execTime int64)
func (*ScenarioResult) AddItems ¶
func (s *ScenarioResult) AddItems(protoItems []*gauge_messages.ProtoItem)
func (*ScenarioResult) AddPostHook ¶ added in v0.8.4
func (s *ScenarioResult) AddPostHook(f ...*gauge_messages.ProtoHookFailure)
func (*ScenarioResult) AddPreHook ¶ added in v0.8.4
func (s *ScenarioResult) AddPreHook(f ...*gauge_messages.ProtoHookFailure)
func (*ScenarioResult) AddTearDownSteps ¶ added in v0.3.0
func (s *ScenarioResult) AddTearDownSteps(tearDownProtoItems []*gauge_messages.ProtoItem)
func (*ScenarioResult) ExecTime ¶ added in v0.5.0
func (s *ScenarioResult) ExecTime() int64
func (*ScenarioResult) GetFailed ¶ added in v0.5.0
func (s *ScenarioResult) GetFailed() bool
func (*ScenarioResult) GetPostHook ¶ added in v0.5.0
func (s *ScenarioResult) GetPostHook() []*gauge_messages.ProtoHookFailure
func (*ScenarioResult) GetPreHook ¶ added in v0.5.0
func (s *ScenarioResult) GetPreHook() []*gauge_messages.ProtoHookFailure
func (*ScenarioResult) Item ¶ added in v0.5.0
func (s *ScenarioResult) Item() interface{}
func (*ScenarioResult) SetFailure ¶
func (s *ScenarioResult) SetFailure()
func (*ScenarioResult) UpdateExecutionTime ¶
func (s *ScenarioResult) UpdateExecutionTime()
type SpecResult ¶
type SpecResult struct { ProtoSpec *gauge_messages.ProtoSpec ScenarioFailedCount int ScenarioCount int IsFailed bool FailedDataTableRows []int32 ExecutionTime int64 Skipped bool ScenarioSkippedCount int Errors []*gauge_messages.Error }
func (*SpecResult) AddExecTime ¶
func (specResult *SpecResult) AddExecTime(execTime int64)
func (*SpecResult) AddPostHook ¶ added in v0.8.4
func (specResult *SpecResult) AddPostHook(f ...*gauge_messages.ProtoHookFailure)
func (*SpecResult) AddPreHook ¶ added in v0.8.4
func (specResult *SpecResult) AddPreHook(f ...*gauge_messages.ProtoHookFailure)
func (*SpecResult) AddScenarioResults ¶
func (specResult *SpecResult) AddScenarioResults(scenarioResults []Result)
func (*SpecResult) AddSpecItems ¶
func (specResult *SpecResult) AddSpecItems(resolvedItems []*gauge_messages.ProtoItem)
func (*SpecResult) AddTableRelatedScenarioResult ¶ added in v0.8.4
func (specResult *SpecResult) AddTableRelatedScenarioResult(scenarioResults [][]Result, index int)
func (*SpecResult) ExecTime ¶ added in v0.5.0
func (specResult *SpecResult) ExecTime() int64
func (*SpecResult) GetFailed ¶ added in v0.5.0
func (specResult *SpecResult) GetFailed() bool
func (*SpecResult) GetPostHook ¶ added in v0.5.0
func (specResult *SpecResult) GetPostHook() []*gauge_messages.ProtoHookFailure
func (*SpecResult) GetPreHook ¶ added in v0.5.0
func (specResult *SpecResult) GetPreHook() []*gauge_messages.ProtoHookFailure
func (*SpecResult) Item ¶ added in v0.5.0
func (specResult *SpecResult) Item() interface{}
func (*SpecResult) SetFailure ¶
func (specResult *SpecResult) SetFailure()
func (*SpecResult) SetSkipped ¶ added in v0.5.0
func (specResult *SpecResult) SetSkipped(skipped bool)
type StepResult ¶ added in v0.5.0
type StepResult struct { StepFailed bool // contains filtered or unexported fields }
StepResult represents the result of step execution
func NewStepResult ¶ added in v0.5.0
func NewStepResult(ps *gauge_messages.ProtoStep) *StepResult
NewStepResult is a constructor for StepResult
func (*StepResult) AddExecTime ¶ added in v0.5.0
func (s *StepResult) AddExecTime(t int64)
AddExecTime increments the execution time by the given value
func (*StepResult) AddPostHook ¶ added in v0.8.4
func (s *StepResult) AddPostHook(f ...*gauge_messages.ProtoHookFailure)
func (*StepResult) AddPreHook ¶ added in v0.8.4
func (s *StepResult) AddPreHook(f ...*gauge_messages.ProtoHookFailure)
func (*StepResult) ExecTime ¶ added in v0.5.0
func (s *StepResult) ExecTime() int64
ExecTime returns the time taken to execute the step
func (*StepResult) GetErrorMessage ¶ added in v0.5.0
func (s *StepResult) GetErrorMessage() string
GetErrorMessage returns the error message for step failure
func (*StepResult) GetFailed ¶ added in v0.5.0
func (s *StepResult) GetFailed() bool
GetFailed returns the state of the result
func (*StepResult) GetPostHook ¶ added in v0.5.0
func (s *StepResult) GetPostHook() []*gauge_messages.ProtoHookFailure
func (*StepResult) GetPreHook ¶ added in v0.5.0
func (s *StepResult) GetPreHook() []*gauge_messages.ProtoHookFailure
func (*StepResult) GetStackTrace ¶ added in v0.5.0
func (s *StepResult) GetStackTrace() string
GetStackTrace returns the stacktrace for step failure
func (*StepResult) GetStepActualText ¶ added in v0.5.0
func (s *StepResult) GetStepActualText() string
GetStepActualText returns the Actual text of step from step result
func (*StepResult) GetStepFailed ¶ added in v0.5.0
func (s *StepResult) GetStepFailed() bool
GetFailed returns true if the actual step failed, and not step hook.
func (*StepResult) Item ¶ added in v0.5.0
func (s *StepResult) Item() interface{}
func (*StepResult) ProtoStepExecResult ¶ added in v0.5.0
func (s *StepResult) ProtoStepExecResult() *gauge_messages.ProtoStepExecutionResult
ProtoStepExecResult returns the step execution result used at the proto layer
func (*StepResult) SetFailure ¶ added in v0.5.0
func (s *StepResult) SetFailure()
SetFailure sets the result to failed
func (*StepResult) SetProtoExecResult ¶ added in v0.5.0
func (s *StepResult) SetProtoExecResult(r *gauge_messages.ProtoExecutionResult)
SetProtoExecResult sets the execution result
func (*StepResult) SetStepFailure ¶ added in v0.5.0
func (s *StepResult) SetStepFailure()
SetStepFailure sets the actual step as failed. StepResult.ProtoStep.GetFailed() returns true even if hook failed and not actual step.
type SuiteResult ¶
type SuiteResult struct { SpecResults []*SpecResult PreSuite *(gauge_messages.ProtoHookFailure) PostSuite *(gauge_messages.ProtoHookFailure) IsFailed bool SpecsFailedCount int ExecutionTime int64 //in milliseconds UnhandledErrors []error Environment string Tags string ProjectName string Timestamp string SpecsSkippedCount int }
func NewSuiteResult ¶
func NewSuiteResult(tags string, startTime time.Time) *SuiteResult
func (*SuiteResult) AddPostHook ¶ added in v0.8.4
func (sr *SuiteResult) AddPostHook(f ...*gauge_messages.ProtoHookFailure)
func (*SuiteResult) AddPreHook ¶ added in v0.8.4
func (sr *SuiteResult) AddPreHook(f ...*gauge_messages.ProtoHookFailure)
func (*SuiteResult) AddSpecResult ¶
func (sr *SuiteResult) AddSpecResult(specResult *SpecResult)
func (*SuiteResult) AddSpecResults ¶ added in v0.5.0
func (sr *SuiteResult) AddSpecResults(specResults []*SpecResult)
func (*SuiteResult) AddUnhandledError ¶ added in v0.5.0
func (sr *SuiteResult) AddUnhandledError(err error)
func (*SuiteResult) ExecTime ¶ added in v0.5.0
func (sr *SuiteResult) ExecTime() int64
func (*SuiteResult) GetFailed ¶ added in v0.5.0
func (sr *SuiteResult) GetFailed() bool
func (*SuiteResult) GetPostHook ¶ added in v0.5.0
func (sr *SuiteResult) GetPostHook() []*gauge_messages.ProtoHookFailure
func (*SuiteResult) GetPreHook ¶ added in v0.5.0
func (sr *SuiteResult) GetPreHook() []*gauge_messages.ProtoHookFailure
func (*SuiteResult) Item ¶ added in v0.5.0
func (sr *SuiteResult) Item() interface{}
func (*SuiteResult) SetFailure ¶
func (sr *SuiteResult) SetFailure()
func (*SuiteResult) SetSpecsSkippedCount ¶ added in v0.5.0
func (sr *SuiteResult) SetSpecsSkippedCount()
func (*SuiteResult) UpdateExecTime ¶ added in v0.5.0
func (sr *SuiteResult) UpdateExecTime(startTime time.Time)