當前位置: 首頁>>代碼示例>>Golang>>正文


Golang runner.TestRunner類代碼示例

本文整理匯總了Golang中github.com/getgauge/gauge/runner.TestRunner的典型用法代碼示例。如果您正苦於以下問題:Golang TestRunner類的具體用法?Golang TestRunner怎麽用?Golang TestRunner使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了TestRunner類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: performRefactoringOn

func (agent *rephraseRefactorer) performRefactoringOn(specs []*parser.Specification, conceptDictionary *parser.ConceptDictionary) *refactoringResult {
	specsRefactored, conceptFilesRefactored := agent.rephraseInSpecsAndConcepts(&specs, conceptDictionary)

	result := &refactoringResult{Success: false, Errors: make([]string, 0), warnings: make([]string, 0)}
	if !agent.isConcept {
		var runner *runner.TestRunner
		select {
		case runner = <-agent.startChan.RunnerChan:
		case err := <-agent.startChan.ErrorChan:
			result.Errors = append(result.Errors, "Cannot perform refactoring: Unable to connect to runner."+err.Error())
			return result
		}
		defer runner.Kill(execLogger.Current())
		stepName, err, warning := agent.getStepNameFromRunner(runner)
		if err != nil {
			result.Errors = append(result.Errors, err.Error())
			return result
		}
		if warning == nil {
			runnerFilesChanged, err := agent.requestRunnerForRefactoring(runner, stepName)
			if err != nil {
				result.Errors = append(result.Errors, fmt.Sprintf("Cannot perform refactoring: %s", err))
				return result
			}
			result.runnerFilesChanged = runnerFilesChanged
		} else {
			result.warnings = append(result.warnings, warning.Message)
		}
	}
	specFiles, conceptFiles := writeToConceptAndSpecFiles(specs, conceptDictionary, specsRefactored, conceptFilesRefactored)
	result.specsChanged = specFiles
	result.Success = true
	result.conceptsChanged = conceptFiles
	return result
}
開發者ID:ranjeet-floyd,項目名稱:gauge,代碼行數:35,代碼來源:refactor.go

示例2: startSpecsExecutionWithRunner

func (e *parallelExecution) startSpecsExecutionWithRunner(s *gauge.SpecCollection, resChan chan *result.SuiteResult, runner *runner.TestRunner, reporter reporter.Reporter) {
	executionInfo := newExecutionInfo(s, runner, e.pluginHandler, reporter, e.errMaps, false)
	se := newSimpleExecution(executionInfo)
	se.execute()
	runner.Kill()
	resChan <- se.suiteResult
}
開發者ID:mattdotmatt,項目名稱:gauge,代碼行數:7,代碼來源:parallelExecution.go

示例3: startSpecsExecutionWithRunner

func (e *parallelExecution) startSpecsExecutionWithRunner(specStore *specStore, suiteResultsChan chan *result.SuiteResult, runner *runner.TestRunner, reporter reporter.Reporter) {
	executionInfo := newExecutionInfo(e.manifest, specStore, runner, e.pluginHandler, reporter, e.errMaps, false)
	simpleExecution := newExecution(executionInfo)
	simpleExecution.start()
	result := simpleExecution.run()
	runner.Kill()
	suiteResultsChan <- result
}
開發者ID:0-T-0,項目名稱:gauge,代碼行數:8,代碼來源:parallelExecution.go

示例4: validateSpecs

func validateSpecs(manifest *manifest.Manifest, specsToExecute []*parser.Specification, runner *runner.TestRunner, conceptDictionary *parser.ConceptDictionary) {
	validator := newValidator(manifest, specsToExecute, runner, conceptDictionary)
	validationErrors := validator.validate()
	if len(validationErrors) > 0 {
		printValidationFailures(validationErrors)
		runner.Kill(execLogger.Current())
		os.Exit(1)
	}
}
開發者ID:ranjeet-floyd,項目名稱:gauge,代碼行數:9,代碼來源:execute.go

示例5: startSpecsExecutionWithRunner

func (e *parallelSpecExecution) startSpecsExecutionWithRunner(specCollection *filter.SpecCollection, suiteResults chan *result.SuiteResult, runner *runner.TestRunner, writer execLogger.ExecutionLogger) {
	execution := newExecution(e.manifest, specCollection.Specs, runner, e.pluginHandler, &parallelInfo{inParallel: false}, writer)
	result := execution.start()
	runner.Kill(e.writer)
	suiteResults <- result
}
開發者ID:ranjeet-floyd,項目名稱:gauge,代碼行數:6,代碼來源:parallelExecution.go

示例6: startSpecsExecutionWithRunner

func (e *parallelSpecExecution) startSpecsExecutionWithRunner(specCollection *filter.SpecCollection, suiteResults chan *result.SuiteResult, runner *runner.TestRunner, logger *logger.GaugeLogger) {
	execution := newExecution(&executionInfo{e.manifest, specCollection.Specs, runner, e.pluginHandler, &parallelInfo{inParallel: false}, logger, e.errMaps})
	result := execution.start()
	runner.Kill()
	suiteResults <- result
}
開發者ID:krwhitney,項目名稱:gauge,代碼行數:6,代碼來源:parallelExecution.go


注:本文中的github.com/getgauge/gauge/runner.TestRunner類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。