Пример #1
0
func (e *simpleExecution) executeSpecs(specs *gauge.SpecCollection) {
	for specs.HasNext() {
		s := specs.Next()
		ex := newSpecExecutor(s, e.runner, e.pluginHandler, getDataTableRows(s.DataTable.Table.GetRowCount()), e.consoleReporter, e.errMaps)
		e.suiteResult.AddSpecResult(ex.execute())
	}
}
Пример #2
0
func (e *simpleExecution) executeSpecs(specs *gauge.SpecCollection) []*result.SpecResult {
	var results []*result.SpecResult
	for specs.HasNext() {
		s := specs.Next()
		ex := newSpecExecutor(s, e.runner, e.pluginHandler, getDataTableRows(s.DataTable.Table.GetRowCount()), e.consoleReporter, e.errMaps)
		results = append(results, ex.execute())
	}
	return results
}
Пример #3
0
func (e *parallelExecution) startSpecsExecution(s *gauge.SpecCollection, reporter reporter.Reporter, resChan chan *result.SuiteResult) {
	defer e.wg.Done()
	runner, err := runner.StartRunnerAndMakeConnection(e.manifest, reporter, make(chan bool))
	if err != nil {
		logger.Errorf("Failed to start runner. %s", err.Error())
		logger.Debug("Skipping %d specifications", s.Size())
		resChan <- &result.SuiteResult{UnhandledErrors: []error{streamExecError{specsSkipped: s.SpecNames(), message: fmt.Sprintf("Failed to start runner. %s", err.Error())}}}
		return
	}
	e.startSpecsExecutionWithRunner(s, resChan, runner, reporter)
}