How to enable debug on my JUnit through Gradle test task

前端 未结 4 1467
日久生厌
日久生厌 2020-12-23 20:10

I get into trouble while I try to run my JUnit test through gradle test task. While I run test in eclipse directly with Run As -> JUnit test, everything is ok, test succeeds

4条回答
  •  -上瘾入骨i
    2020-12-23 20:24

    To debug tests the following argument should be used: --debug-jvm

    For example: gradle test --debug-jvm
    Gradle will suspend execution right before running tests and wait for debugger connection on port 5005.

    For executing only specific tests see https://docs.gradle.org/current/userguide/java_testing.html#simple_name_pattern

提交回复
热议问题