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


Golang manifest.ProjectManifest函數代碼示例

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


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

示例1: ExecuteSpecs

func ExecuteSpecs(inParallel bool, args []string) int {
	if checkUpdatesDuringExecution && config.CheckUpdates() {
		i := &install.UpdateFacade{}
		i.BufferUpdateDetails()
		defer i.PrintUpdateBuffer()
	}

	env.LoadEnv(false)
	specsToExecute, conceptsDictionary := parseSpecs(args)
	manifest, err := manifest.ProjectManifest()
	if err != nil {
		logger.Fatal(err.Error())
	}
	runner := startApi()
	errMap := validateSpecs(manifest, specsToExecute, runner, conceptsDictionary)
	pluginHandler := plugin.StartPlugins(manifest)
	parallelInfo := &parallelInfo{inParallel: inParallel, numberOfStreams: NumberOfExecutionStreams}
	if !parallelInfo.isValid() {
		os.Exit(1)
	}
	execution := newExecution(&executionInfo{manifest, specsToExecute, runner, pluginHandler, parallelInfo, reporter.Current(), errMap})
	result := execution.start()
	execution.finish()
	exitCode := printExecutionStatus(result, errMap)
	return exitCode
}
開發者ID:andrewmkrug,項目名稱:gauge,代碼行數:26,代碼來源:execute.go

示例2: InstallAllPlugins

func InstallAllPlugins() {
	manifest, err := manifest.ProjectManifest()
	if err != nil {
		logger.Fatalf(err.Error())
	}
	installPluginsFromManifest(manifest)
}
開發者ID:0-T-0,項目名稱:gauge,代碼行數:7,代碼來源:install.go

示例3: ExecuteSpecs

func ExecuteSpecs(inParallel bool, args []string) {
	env.LoadEnv(false)
	conceptsDictionary, conceptParseResult := parser.CreateConceptsDictionary(false)
	parser.HandleParseResult(conceptParseResult)
	specsToExecute, specsSkipped := filter.GetSpecsToExecute(conceptsDictionary, args)
	if len(specsToExecute) == 0 {
		printExecutionStatus(nil, 0)
	}
	parallelInfo := &parallelInfo{inParallel: inParallel, numberOfStreams: NumberOfExecutionStreams}
	if !parallelInfo.isValid() {
		os.Exit(1)
	}
	manifest, err := manifest.ProjectManifest()
	if err != nil {
		execLogger.CriticalError(err)
	}
	runner := startApi()
	validateSpecs(manifest, specsToExecute, runner, conceptsDictionary)
	pluginHandler := plugin.StartPlugins(manifest)
	execution := newExecution(manifest, specsToExecute, runner, pluginHandler, parallelInfo, execLogger.Current())
	result := execution.start()
	execution.finish()
	exitCode := printExecutionStatus(result, specsSkipped)
	os.Exit(exitCode)
}
開發者ID:ranjeet-floyd,項目名稱:gauge,代碼行數:25,代碼來源:execute.go

示例4: InstallAllPlugins

func InstallAllPlugins() {
	manifest, err := manifest.ProjectManifest()
	if err != nil {
		execLogger.CriticalError(errors.New(fmt.Sprintf("manifest.json not found : --install-all requires manifest.json in working directory.")))
	}
	installPluginsFromManifest(manifest)
}
開發者ID:krwhitney,項目名稱:gauge,代碼行數:7,代碼來源:install.go

示例5: language

func language() string {
	if config.ProjectRoot == "" {
		return ""
	}
	m, err := manifest.ProjectManifest()
	if err != nil {
		return ""
	}
	return m.Language
}
開發者ID:mattdotmatt,項目名稱:gauge,代碼行數:10,代碼來源:plugin.go

示例6: connectToRunner

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
}
開發者ID:krwhitney,項目名稱:gauge,代碼行數:13,代碼來源:api.go

示例7: Validate

func Validate(args []string) {
	specsToExecute, conceptsDictionary := parseSpecs(args)
	manifest, err := manifest.ProjectManifest()
	if err != nil {
		logger.Fatalf(err.Error())
	}
	runner := startAPI()
	errMap := validateSpecs(manifest, specsToExecute, runner, conceptsDictionary)
	runner.Kill()
	if len(errMap.stepErrs) > 0 {
		os.Exit(1)
	}
	logger.Info("No error found.")
	os.Exit(0)
}
開發者ID:0-T-0,項目名稱:gauge,代碼行數:15,代碼來源:execute.go

示例8: getStepsFromRunner

// 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
}
開發者ID:christophermoura,項目名稱:gauge,代碼行數:17,代碼來源:specDetails.go

示例9: newExecutionInfo

func newExecutionInfo(s *gauge.SpecCollection, r *runner.TestRunner, ph *plugin.Handler, rep reporter.Reporter, e *validation.ValidationErrMaps, p bool) *executionInfo {
	m, err := manifest.ProjectManifest()
	if err != nil {
		logger.Fatalf(err.Error())
	}
	return &executionInfo{
		manifest:        m,
		specs:           s,
		runner:          r,
		pluginHandler:   ph,
		consoleReporter: rep,
		errMaps:         e,
		inParallel:      p,
		numberOfStreams: NumberOfExecutionStreams,
	}
}
開發者ID:mattdotmatt,項目名稱:gauge,代碼行數:16,代碼來源:execute.go

示例10: CheckSpecs

func CheckSpecs(args []string) {
	env.LoadEnv(false)
	specsToExecute, conceptsDictionary := parseSpecs(args)
	manifest, err := manifest.ProjectManifest()
	if err != nil {
		logger.Log.Critical(err.Error())
	}
	runner := startApi()
	errMap := validateSpecs(manifest, specsToExecute, runner, conceptsDictionary)
	runner.Kill()
	if len(errMap.stepErrs) > 0 {
		os.Exit(1)
	}
	logger.Log.Info("No error found.")
	os.Exit(0)
}
開發者ID:krwhitney,項目名稱:gauge,代碼行數:16,代碼來源:execute.go

示例11: ValidateSpecs

func ValidateSpecs(args []string, r *runner.TestRunner) (*gauge.SpecCollection, *ValidationErrMaps) {
	s, c := parseSpecs(args)
	manifest, err := manifest.ProjectManifest()
	if err != nil {
		logger.Fatalf(err.Error())
	}
	v := newValidator(manifest, s, r, c)
	vErrs := v.validate()
	errMap := &ValidationErrMaps{
		SpecErrs:     make(map[*gauge.Specification][]*StepValidationError),
		ScenarioErrs: make(map[*gauge.Scenario][]*StepValidationError),
		StepErrs:     make(map[*gauge.Step]*StepValidationError),
	}

	if len(vErrs) > 0 {
		printValidationFailures(vErrs)
		fillErrors(errMap, vErrs)
	}
	return gauge.NewSpecCollection(s), errMap
}
開發者ID:mattdotmatt,項目名稱:gauge,代碼行數:20,代碼來源:validate.go

示例12: ExecuteSpecs

func ExecuteSpecs(inParallel bool, args []string) {
	env.LoadEnv(false)
	specsToExecute, conceptsDictionary := parseSpecs(args)
	manifest, err := manifest.ProjectManifest()
	if err != nil {
		logger.Log.Critical(err.Error())
	}
	runner := startApi()
	errMap := validateSpecs(manifest, specsToExecute, runner, conceptsDictionary)
	pluginHandler := plugin.StartPlugins(manifest)
	parallelInfo := &parallelInfo{inParallel: inParallel, numberOfStreams: NumberOfExecutionStreams}
	if !parallelInfo.isValid() {
		os.Exit(1)
	}
	execution := newExecution(&executionInfo{manifest, specsToExecute, runner, pluginHandler, parallelInfo, &logger.Log, errMap})
	result := execution.start()
	execution.finish()
	exitCode := printExecutionStatus(result, errMap)
	os.Exit(exitCode)
}
開發者ID:krwhitney,項目名稱:gauge,代碼行數:20,代碼來源:execute.go

示例13: ExecuteSpecs

func ExecuteSpecs(inParallel bool, args []string) {
	env.LoadEnv(false)
	specsToExecute, conceptsDictionary := parseSpecs(args)
	manifest, err := manifest.ProjectManifest()
	if err != nil {
		logger.Log.Critical(err.Error())
	}
	runner := startApi()
	errMap := validateSpecs(manifest, specsToExecute, runner, conceptsDictionary)
	pluginHandler := plugin.StartPlugins(manifest)
	parallelInfo := &parallelInfo{inParallel: inParallel, numberOfStreams: NumberOfExecutionStreams}
	if !parallelInfo.isValid() {
		os.Exit(1)
	}
	execution := newExecution(&executionInfo{manifest, specsToExecute, runner, pluginHandler, parallelInfo, &logger.Log, errMap})
	result := execution.start()
	// TODO: Remove this logger line below when plugins call tell the difference between their status messages and user-generated sysouts
	logger.Log.Debug("\n")
	execution.finish()
	exitCode := printExecutionStatus(result, errMap)
	os.Exit(exitCode)
}
開發者ID:universsky,項目名稱:gauge,代碼行數:22,代碼來源:execute.go

示例14: AddPluginToProject

func AddPluginToProject(pluginName string, pluginArgs string) {
	additionalArgs := make(map[string]string)
	if pluginArgs != "" {
		// plugin args will be comma separated values
		// eg: version=1.0, foo_version = 2.41
		args := strings.Split(pluginArgs, ",")
		for _, arg := range args {
			keyValuePair := strings.Split(arg, "=")
			if len(keyValuePair) == 2 {
				additionalArgs[strings.TrimSpace(keyValuePair[0])] = strings.TrimSpace(keyValuePair[1])
			}
		}
	}
	manifest, err := manifest.ProjectManifest()
	if err != nil {
		logger.Fatalf(err.Error())
	}
	if err := addPluginToTheProject(pluginName, additionalArgs, manifest); err != nil {
		logger.Fatalf(fmt.Sprintf("Failed to add plugin %s to project : %s\n", pluginName, err.Error()))
	} else {
		logger.Info("Plugin %s was successfully added to the project\n", pluginName)
	}
}
開發者ID:0-T-0,項目名稱:gauge,代碼行數:23,代碼來源:install.go

示例15: ExecuteSpecs

func ExecuteSpecs(args []string) int {
	validateFlags()
	if checkUpdatesDuringExecution && config.CheckUpdates() {
		i := &install.UpdateFacade{}
		i.BufferUpdateDetails()
		defer i.PrintUpdateBuffer()
	}

	specsToExecute, conceptsDictionary := parseSpecs(args)
	manifest, err := manifest.ProjectManifest()
	if err != nil {
		logger.Fatalf(err.Error())
	}
	runner := startAPI()
	errMap := validateSpecs(manifest, specsToExecute, runner, conceptsDictionary)
	executionInfo := newExecutionInfo(manifest, &specStore{specs: specsToExecute}, runner, nil, reporter.Current(), errMap, InParallel)
	execution := newExecution(executionInfo)
	execution.start()
	result := execution.run()
	execution.finish()
	exitCode := printExecutionStatus(result, errMap)
	return exitCode
}
開發者ID:0-T-0,項目名稱:gauge,代碼行數:23,代碼來源:execute.go


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