gpt4 book ai didi

java - Gradle 与 TestNg : No tests found

转载 作者:行者123 更新时间:2023-11-30 05:38:20 25 4
gpt4 key购买 nike

我正在使用gradle项目

  1. 项目在 junit 上运行良好,但是
  2. 使用 TestNg 我收到构建失败错误
    Testing started at 9:18 PM ...
9:18:08 PM: Executing tasks ':cleanTest :test --tests "abc.lau" --scan'...

> Task :cleanTest
> Task :compileJava NO-SOURCE
> Task :processResources NO-SOURCE
> Task :classes UP-TO-DATE
> Task :compileTestJava
> Task :processTestResources NO-SOURCE
> Task :testClasses
> Task :test FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':test'.
> No tests found for given includes: [abc.lau](filter.includeTestsMatching)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 0s
3 actionable tasks: 3 executed

最佳答案

您是否在 build.gradle 中明确指定您使用 testng?

test {
useTestNG()
}

关于java - Gradle 与 TestNg : No tests found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56195976/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com