本文整理匯總了Golang中github.com/getgauge-contrib/gauge-go/testsuit.GaugeContext類的典型用法代碼示例。如果您正苦於以下問題:Golang GaugeContext類的具體用法?Golang GaugeContext怎麽用?Golang GaugeContext使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了GaugeContext類的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: Process
func (r *ExecutionStartingRequestProcessor) Process(msg *m.Message, context *t.GaugeContext) *m.Message {
tags := msg.GetExecutionStartingRequest().GetCurrentExecutionInfo().GetCurrentScenario().GetTags()
hooks := context.GetHooks(t.BEFORESUITE, tags)
return executeHooks(hooks, msg)
}
示例2: Process
func (r *StepExecutionEndingProcessor) Process(msg *m.Message, context *t.GaugeContext) *m.Message {
tags := msg.GetStepExecutionEndingRequest().GetCurrentExecutionInfo().GetCurrentSpec().GetTags()
hooks := context.GetHooks(t.AFTERSTEP, tags)
res := executeHooks(hooks, msg)
res.GetExecutionStatusResponse().GetExecutionResult().Message = context.CustomMessageRegistry
context.ClearCustomMessages()
return res
}
示例3: Process
func (r *ExecuteStepProcessor) Process(msg *m.Message, context *t.GaugeContext) *m.Message {
step, err := context.GetStepByDesc(*msg.ExecuteStepRequest.ParsedStepText)
if err != nil {
// if step implementation not found
fmt.Println(err.Error())
}
args := getArgs(msg.ExecuteStepRequest)
exeRes := step.Execute(args...)
return &m.Message{
MessageType: m.Message_ExecutionStatusResponse.Enum(),
MessageId: msg.MessageId,
ExecutionStatusResponse: &m.ExecutionStatusResponse{
ExecutionResult: exeRes,
},
}
}
示例4: Process
func (r *SpecExecutionEndingProcessor) Process(msg *m.Message, context *t.GaugeContext) *m.Message {
tags := msg.GetSpecExecutionEndingRequest().GetCurrentExecutionInfo().GetCurrentSpec().GetTags()
hooks := context.GetHooks(t.AFTERSPEC, tags)
return executeHooks(hooks, msg)
}
示例5: Process
func (r *ScenarioDataStoreInitProcessor) Process(msg *m.Message, context *t.GaugeContext) *m.Message {
context.ScenarioStore = make(map[string]interface{})
return createResponseMessage(msg.MessageId, int64(0), nil)
}
示例6: Process
func (s *SuiteDataStoreInitRequestProcessor) Process(msg *m.Message, context *t.GaugeContext) *m.Message {
context.SuiteStore = make(map[string]interface{})
return createResponseMessage(msg.MessageId, int64(0), nil)
}
示例7: Process
func (r *StepExecutionStartingRequestProcessor) Process(msg *m.Message, context *t.GaugeContext) *m.Message {
tags := msg.GetStepExecutionStartingRequest().GetCurrentExecutionInfo().GetCurrentSpec().GetTags()
hooks := context.GetHooks(t.BEFORESTEP, tags)
context.ClearCustomMessages()
return executeHooks(hooks, msg)
}