相关疑难解决方法(0)

-Dcucumber.options 在 mvn 测试中被忽略

我正在使用“mvn test”来运行黄瓜测试,但是当我尝试使用 -Dcucumber.options=... 在命令行上传递选项时,这些选项将被忽略,并且在运行程序类中的 @CucumberOptions 中指定的选项是代替使用。例如,如果我只是尝试显示黄瓜帮助,它会忽略它并只运行测试:

C:\Maven\ArchCuke\untitled>mvn test -Dcucumber.options="--help"
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------< org.example:untitled >------------------------
[INFO] Building untitled 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ untitled ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Maven\ArchCuke\untitled\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ untitled ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ untitled ---
[INFO] Using 'UTF-8' encoding to …
Run Code Online (Sandbox Code Playgroud)

cucumber maven maven-surefire-plugin

1
推荐指数
1
解决办法
6499
查看次数

标签 统计

cucumber ×1

maven ×1

maven-surefire-plugin ×1