“Test events were not received” when run tests using Intellij

前端 未结 13 2289
花落未央
花落未央 2021-02-06 21:11

I have a Kotlin project and when I run my JUnit tests, I can\'t see tests execution result in IntelliJ and get this message instead:

test events were not

13条回答
  •  情歌与酒
    2021-02-06 21:48

    Answer

    I know of some issues that occur when running Gradle together with the newest JDK versions (13 & 14). If you selected either version 13 or 14 of the JVM as the Gradle JVM try using either 8 or 11.

    Switch the Gradle JVM to version 11:

    File -> Settings -> Build Execution, etc -> Built Tools -> Gradle -> Gradle JVM

    Explanation

    I believe that by default Intellij will use the project SDK:

    Project strcuture -> Project -> Project SDK

    I've had this on several occasions now and picking version 11 of the JVM fixed things for me.

    Worth noting is that for most of my project I'm using:

    • Lombok
    • Jackson
    • Lombok plugin (Require annotation processing to be enabled)

    I don't remember where I read it but I believe there were some issues with the lombok plugin + gradle + JVM version. I might revisit this answer if I can remember where I found the post about it.

提交回复
热议问题