本文整理匯總了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
}
示例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
}
示例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
}
示例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)
}
}
示例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, ¶llelInfo{inParallel: false}, writer)
result := execution.start()
runner.Kill(e.writer)
suiteResults <- result
}
示例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, ¶llelInfo{inParallel: false}, logger, e.errMaps})
result := execution.start()
runner.Kill()
suiteResults <- result
}