Cucumber tags tutorial || run java + maven + cucumber + testNG project from command-line
 Omega Automation Testing Omega Automation Testing
984 subscribers
4,658 views
47

 Published On Jun 30, 2021

This video describes cucumber tags and their usage.
Cucumber tags are basically labels given to scenarios or features. Their syntax is @ followed by a word, example @tag.
These tags are very helpful in putting the scenarios in various types of test execution like regression or smoke
These tags can be run from command line or via the Cucumber option is runner file.
Not just tags we can dynamically insert almost all Cucumber options tags from command line
mvn test -Dproperty name=property value
example:

mvn test -Dcucumber.filter.tags="@smoke"

Supported property
cucumber.ansi-colors.disabled= # true or false. default: false
cucumber.execution.dry-run= # true or false. default: false
cucumber.execution.limit= # number of scenarios to execute (CLI only).
cucumber.execution.order= # lexical, reverse, random or random:[seed] (CLI only). default: lexical
cucumber.execution.strict= # true or false. default: true.
cucumber.execution.wip= # true or false. default: false.
cucumber.features= # comma separated paths to feature files. example: path/to/example.feature, path/to/other.feature
cucumber.filter.name= # regex. example: .*Hello.*
cucumber.filter.tags= # tag expression. example: @smoke and not @slow
cucumber.glue= # comma separated package names. example: com.example.glue
cucumber.plugin= # comma separated plugin strings. example: pretty, json:path/to/report.json
cucumber.object-factory= # object factory class name. example: com.example.MyObjectFactory
cucumber.snippet-type= # underscore or camelcase. default: underscore


Reference - Cucumber docs: https://cucumber.io/docs/cucumber/api/

show more

Share/Embed