示例#1
0
func (executor *specExecutor) executeItem(protoItem *gauge_messages.ProtoItem) bool {
	if protoItem.GetItemType() == gauge_messages.ProtoItem_Concept {
		return executor.executeConcept(protoItem.GetConcept())
	} else if protoItem.GetItemType() == gauge_messages.ProtoItem_Step {
		return executor.executeStep(protoItem.GetStep())
	}
	return false
}
示例#2
0
func (e *scenarioExecutor) executeItem(protoItem *gauge_messages.ProtoItem) *gauge_messages.ProtoStepExecutionResult {
	if protoItem.GetItemType() == gauge_messages.ProtoItem_Concept {
		return e.executeConcept(protoItem.GetConcept())
	} else if protoItem.GetItemType() == gauge_messages.ProtoItem_Step {
		se := &stepExecutor{runner: e.runner, pluginHandler: e.pluginHandler, currentExecutionInfo: e.currentExecutionInfo, consoleReporter: e.consoleReporter}
		protoItem.GetStep().StepExecutionResult = se.executeStep(protoItem.GetStep())
		return protoItem.GetStep().StepExecutionResult
	}
	return nil
}