• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Golang manifest.ProjectManifest函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Golang manifest.Manifest类代码示例发布时间:2022-05-23
下一篇:
Golang logger.GaugeLogger类代码示例发布时间:2022-05-23
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap