Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/date/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
通过gradle命令行-空手道运行单跑步者课程_Gradle_Karate - Fatal编程技术网

通过gradle命令行-空手道运行单跑步者课程

通过gradle命令行-空手道运行单跑步者课程,gradle,karate,Gradle,Karate,我在src/test/java文件夹中创建了多个runner类。当我运行gradle命令时 梯度测试-DcatsRunner 它运行文件夹中的所有运行程序文件,而不仅仅是一个。如何使用gradle命令行仅运行一个运行程序文件 gradle test-DcatsRunner您希望使用gradle运行单个测试用例 运行gradle help--task test将为您提供以下帮助消息: $ gradle help --task test Configuration on demand is an

我在src/test/java文件夹中创建了多个runner类。当我运行gradle命令时 梯度测试-DcatsRunner 它运行文件夹中的所有运行程序文件,而不仅仅是一个。如何使用gradle命令行仅运行一个运行程序文件


gradle test-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
如果您想设置更全面的测试筛选,请阅读