通过Gradle命令行运行单个跑步者课程-空手道 [英] Run a single Runner class through gradle command line - karate
本文介绍了通过Gradle命令行运行单个跑步者课程-空手道的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在src/test/Java文件夹中创建了多个Runner类。当我运行Gradle命令时, Gradle测试-DcatsRunner 它运行文件夹中的所有Runner文件,而不是只运行一个。如何使用Gradle命令行仅运行一个Runner文件
Gradle测试-DcatsRunner
Gradle
您希望使用推荐答案运行单个测试用例。
运行gradle help --task test
将显示以下帮助消息:
$ gradle help --task test
Configuration on demand is an incubating feature.
> Task :help
Detailed task information for test
Path
:test
Type
Test (org.gradle.api.tasks.testing.Test)
Options
--debug-jvm Enable debugging for the test process. The process is started suspended and listening on port 5005.
--fail-fast Stops test execution after the first failed test.
--tests Sets test class or method name to be included, '*' is supported.
Description
Runs the unit tests.
Group
verification
--test
参数就是您要查找的参数。
在您的情况下:
gradle test --tests catsRunner
如果要设置更全面的测试筛选,请阅读the test filtering gradle documentation。
这篇关于通过Gradle命令行运行单个跑步者课程-空手道的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文