コード例 #1
0
func (e *parallelExecution) startStream(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())
		resChan <- &result.SuiteResult{UnhandledErrors: []error{fmt.Errorf("Failed to start runner. %s", err.Error())}}
		return
	}
	e.startSpecsExecutionWithRunner(s, resChan, runner, reporter)
}
コード例 #2
0
ファイル: parallelExecution.go プロジェクト: krwhitney/gauge
func (e *parallelSpecExecution) startSpecsExecution(specCollection *filter.SpecCollection, suiteResults chan *result.SuiteResult, log *logger.GaugeLogger) {
	testRunner, err := runner.StartRunnerAndMakeConnection(e.manifest, log, make(chan bool))
	if err != nil {
		e.logger.Error("Failed: " + err.Error())
		e.logger.Debug("Skipping %s specifications", strconv.Itoa(len(specCollection.Specs)))
		suiteResults <- &result.SuiteResult{UnhandledErrors: []error{streamExecError{specsSkipped: specCollection.SpecNames(), message: fmt.Sprintf("Failed to start runner. %s", err.Error())}}}
		return
	}
	e.startSpecsExecutionWithRunner(specCollection, suiteResults, testRunner, log)
}
コード例 #3
0
ファイル: parallelExecution.go プロジェクト: 0-T-0/gauge
func (e *parallelExecution) startStream(specStore *specStore, reporter reporter.Reporter, suiteResultChannel chan *result.SuiteResult) {
	defer e.wg.Done()
	testRunner, err := runner.StartRunnerAndMakeConnection(e.manifest, reporter, make(chan bool))
	if err != nil {
		logger.Error("Failed to start runner. Reason: %s", err.Error())
		suiteResultChannel <- &result.SuiteResult{UnhandledErrors: []error{fmt.Errorf("Failed to start runner. %s", err.Error())}}
		return
	}
	e.startSpecsExecutionWithRunner(specStore, suiteResultChannel, testRunner, reporter)
}
コード例 #4
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)
}
コード例 #5
0
ファイル: parallelExecution.go プロジェクト: krwhitney/gauge
func (e *parallelSpecExecution) startStream(specs *specList, log *logger.GaugeLogger, suiteResultChannel chan *result.SuiteResult) {
	defer e.wg.Done()
	testRunner, err := runner.StartRunnerAndMakeConnection(e.manifest, log, make(chan bool))
	if err != nil {
		log.Error("Failed to start runner. Reason: %s", err.Error())
		suiteResultChannel <- &result.SuiteResult{UnhandledErrors: []error{errors.New(fmt.Sprintf("Failed to start runner. %s", err.Error()))}}
		return
	}
	simpleExecution := newSimpleExecution(&executionInfo{e.manifest, make([]*parser.Specification, 0), testRunner, e.pluginHandler, nil, log, e.errMaps})
	result := simpleExecution.executeStream(specs)
	suiteResultChannel <- result
}
コード例 #6
0
ファイル: api.go プロジェクト: krwhitney/gauge
func connectToRunner(killChannel chan bool) (*runner.TestRunner, error) {
	manifest, err := manifest.ProjectManifest()
	if err != nil {
		return nil, err
	}

	runner, connErr := runner.StartRunnerAndMakeConnection(manifest, &logger.Log, killChannel)
	if connErr != nil {
		return nil, connErr
	}

	return runner, nil
}
コード例 #7
0
ファイル: specDetails.go プロジェクト: christophermoura/gauge
// Gets all steps list from the runner
func (specInfoGatherer *SpecInfoGatherer) getStepsFromRunner(killChannel chan bool) (*runner.TestRunner, error) {
	steps := make([]string, 0)
	manifest, err := manifest.ProjectManifest()
	if err != nil {
		execLogger.CriticalError(err)
	}
	testRunner, connErr := runner.StartRunnerAndMakeConnection(manifest, &logger.Log, killChannel)
	if connErr == nil {
		steps = append(steps, requestForSteps(testRunner)...)
		logger.ApiLog.Debug("Steps got from runner: %v", steps)
	} else {
		logger.ApiLog.Error("Runner connection failed: %s", connErr)
	}
	specInfoGatherer.runnerStepValues = specInfoGatherer.convertToStepValues(steps)
	return testRunner, connErr
}