How to enable debug on my JUnit through Gradle test task

前端 未结 4 1472
日久生厌
日久生厌 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条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-23 20:27

    I'm on 4.6 (gradle) and I'm able to debug my tests when I have this in my build.gradle file:

    test {
        debug true
    }
    

    Link - https://docs.gradle.org/4.6/userguide/userguide_single.html#sec:java_test

提交回复
热议问题