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)
}
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
}
Exemple #3
0
func WriteGaugeMessage(message *gauge_messages.Message, conn net.Conn) error {
	messageId := common.GetUniqueID()
	message.MessageId = &messageId

	data, err := proto.Marshal(message)
	if err != nil {
		return err
	}
	return Write(conn, data)
}
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)
}
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)
}