在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):tsundberg/gradle-cucumber-runner开源软件地址(OpenSource Url):https://github.com/tsundberg/gradle-cucumber-runner开源编程语言(OpenSource Language):Java 100.0%开源软件介绍(OpenSource Introduction):Gradle Cucumber runnerA gradle plugin for running Cucumber-JVM. It utilises the Cucumber-JVM command line implementation and forwards every call to UsageAdd the plugin to your project
The complete, and updated, instructions are availabe at the plugin portal. Then run Cucumber with the default settings
ConfigurationCucumber must know where your steps are implemented. Add an extension to your gradle build script.
This will search for steps in the package The complete list of options that can be set are these:
The only setting with default values are
OptionsThe options available can be listed with the command
Single word options can be given to Cucumber with the syntax
More complicated expressions should be quoted to be forwarded to Cucumber.
TagsAn important part of running Cucumber is to be able to partition the execution using different tags. Executing a single tag can be done like this:
(assuming that you have a tag for work in progress, wip) Cucumber supports multiple tags to be executed at the same time. Or negating a tag so everything else is executed. Unfortunately, you can't stack tags. The solution is to put them into quotes like this:
Doing so will forward the expression GluesCucumber uses glue to locate where the step definitions are. Specify them in the build file using glue = 'classpath:se.thinkcode'
extraGlues = ['another.classpath', 'to.include'] Or specify them as a command line option: --glue "classpath:se.thinkcode" OR --glue "classpath:se.thinkcode, another.classpath, to.include"
# The string will be divided into an array with `,` as delimiter. Any whitespace around `,` will be removed. PluginsCucumber supports usage of multiple plugins at the same time. Specify them as an array of strings in the build file
Or specify them as a command line option:
The string will be divided into an array with This will specify that two plugins will be used and there names are
The Running features in parallelCucumber supports parallel execution if you specify the number of thread to use. This can be done in two ways
When setting the value in the build script, you can't really know how many threads the build will have access to. Hardcoding a fixed number may not be your best option. One way of specifying the number of threads to use is:
This will use as many threads as possible while leaving resources for Gradle to execute. Shortening the command lineTo solve the issue on Windows where there is a command line's length limit, use the option you can specify them in the build file like this: cucumber {
shorten = manifest
} or via the command line: --shorten manifest there are two possible values:
--junitCucumber support setting properties for If you have an example where you think you need it, please share the example nd the desired outcome.
Maybe there should be support for Getting help
This will call Cucumber with the argument Trouble shootingJava 8 is requiredThe plugin is build using Java 8 and gradle must be executed with Java 8 or newer. The cucumber command executedExecute Gradle with The printout is verbose, search for CaveatIn order for Cucumber to have all test resources available, the cucumber task depends on the java plugin task The Java plugin lifecycle is described in the Java plugin documentation. DevelopmentDevelopment is described in development.md |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论