嗨,我在gradle包装器上遇到了一些麻烦。
有什么好的方法来编译我的所有代码,编译我的所有测试以及运行单个测试。
这是针对Jenkins管道中的脚本命令。
我用过了
谢谢你的帮助
最佳答案
请参阅gradle文档https://docs.gradle.org/current/userguide/java_testing.html#test_filtering
# Executes all tests in SomeTestClass
gradle test --tests SomeTestClass
# Executes a single specified test in SomeTestClass
gradle test --tests SomeTestClass.someSpecificMethod
gradle test --tests SomeTestClass.*someMethod*
# specific class
gradle test --tests org.gradle.SomeTestClass
# specific class and method
gradle test --tests org.gradle.SomeTestClass.someSpecificMethod
关于bash - Gradle Wrapper编译和构建代码并运行单个单元测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62849981/