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()) } }
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 }
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) }