Improved the help text of the formatter flag in the run command (#347)

* Improved the help text of the formatter flag in the run command

* Made some more changes to the help text for the run command

* made some small changes to the help text of the run and build cmd
Этот коммит содержится в:
Fredrik Lönnblad 2020-10-12 09:13:45 +02:00 коммит произвёл GitHub
родитель 66793de350
коммит 5e994943b3
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 26 добавлений и 18 удалений

Просмотреть файл

@ -32,7 +32,8 @@ The test runner can be executed with the same flags as when using godog run.`,
Run: buildCmdRunFunc, Run: buildCmdRunFunc,
} }
buildCmd.Flags().StringVarP(&buildOutput, "output", "o", buildOutputDefault, "compiles the test runner to the named file") buildCmd.Flags().StringVarP(&buildOutput, "output", "o", buildOutputDefault, `compiles the test runner to the named file
`)
return buildCmd return buildCmd
} }

Просмотреть файл

@ -28,9 +28,9 @@ buildable go source.`,
godog run <feature> <feature> godog run <feature> <feature>
Optional feature(s) to run: Optional feature(s) to run:
- dir (features/) dir (features/)
- feature (*.feature) feature (*.feature)
- scenario at specific line (*.feature:10) scenario at specific line (*.feature:10)
If no feature arguments are supplied, godog will use "features/" by default.`, If no feature arguments are supplied, godog will use "features/" by default.`,
Run: runCmdRunFunc, Run: runCmdRunFunc,
} }

Просмотреть файл

@ -17,17 +17,24 @@ func BindRunCmdFlags(prefix string, flagSet *pflag.FlagSet, opts *Options) {
flagSet.BoolVar(&opts.NoColors, prefix+"no-colors", opts.NoColors, "disable ansi colors") flagSet.BoolVar(&opts.NoColors, prefix+"no-colors", opts.NoColors, "disable ansi colors")
flagSet.IntVarP(&opts.Concurrency, prefix+"concurrency", "c", opts.Concurrency, "run the test suite with concurrency") flagSet.IntVarP(&opts.Concurrency, prefix+"concurrency", "c", opts.Concurrency, "run the test suite with concurrency")
flagSet.StringVarP(&opts.Tags, prefix+"tags", "t", opts.Tags, `filter scenarios by tags, expression can be: flagSet.StringVarP(&opts.Tags, prefix+"tags", "t", opts.Tags, `filter scenarios by tags, expression can be:
- "@wip": run all scenarios with wip tag "@wip" run all scenarios with wip tag
- "~@wip": exclude all scenarios with wip tag "~@wip" exclude all scenarios with wip tag
- "@wip && ~@new": run wip scenarios, but exclude new "@wip && ~@new" run wip scenarios, but exclude new
- "@wip,@undone": run wip or undone scenarios`) "@wip,@undone" run wip or undone scenarios`)
flagSet.StringVarP(&opts.Format, prefix+"format", "f", opts.Format, `writes the formatted output to stdout flagSet.StringVarP(&opts.Format, prefix+"format", "f", opts.Format, `will write a report according to the selected formatter
built-in formatters:
- progress: prints a character per step usage:
- cucumber: produces cucumber JSON format output -f <formatter>
- events: produces JSON event stream, based on spec: 0.1.0 will use the formatter and write the report on stdout
- junit: prints junit compatible xml to stdout -f <formatter>:<file_path>
- pretty: prints every feature with runtime statuses will use the formatter and write the report to the file path
built-in formatters are:
progress prints a character per step
cucumber produces a Cucumber JSON report
events produces JSON event stream, based on spec: 0.1.0
junit produces JUnit compatible XML report
pretty prints every feature with runtime statuses
`) `)
flagSet.BoolVarP(&opts.ShowStepDefinitions, prefix+"definitions", "d", opts.ShowStepDefinitions, "print all available step definitions") flagSet.BoolVarP(&opts.ShowStepDefinitions, prefix+"definitions", "d", opts.ShowStepDefinitions, "print all available step definitions")