在scala测试模块中使用gradle运行特定测试
在scala测试模块中使用gradle运行特定测试,scala,unit-testing,gradle,Scala,Unit Testing,Gradle,我用scala编写的“测试”模块有以下结构 tests/ build.gradle src/ resources/ scala/ system/basic/SomeTests.scala 我可以使用 ./gradlew tests:test 如何从命令行仅运行SomeTests.scala?如果它与Java没有什么不同,那么使用--tests任务参数 ./gradlew tests:test --tests sys
我用scala编写的“测试”模块有以下结构
tests/
build.gradle
src/
resources/
scala/
system/basic/SomeTests.scala
我可以使用
./gradlew tests:test
如何从命令行仅运行SomeTests.scala?如果它与Java没有什么不同,那么使用
--tests
任务参数
./gradlew tests:test --tests system.basic.SomeTests
运行该类中的所有测试,或e。g
./gradlew tests:test --tests system.basic.SomeTests.foo
只运行
foo
测试方法。它的可能副本仍然会运行所有的测试,看起来像是--tests param根本不受欢迎使用-i
和/或-d
运行以获得更多关于正在发生的事情的信息并将输出添加到问题中。这对Gradle 6.9不起作用。命令:/gradlew tests:test--测试someProject。TestClass
给出:在根项目“someProject”中找不到项目“tests”。