Can't see the AI assistant "Generate Unit Tests" option
I seem to be having trouble getting that menu to appear in a kotlin/Android project I'm fiddling around with. I have a submodule in my gradle project and any class that I click in that project doesn't seem to get me that option. At one point, it did for a short while, but then it went away again (I did change stuff around though, but I can't remember what).
This is the gradle file of that module, if that's any help. Has anybody else seen this problem ? Is there a way to debug this ?
(My intuition is that IntelliJ is looking for a specific test configuration)plugins {
kotlin("jvm") version "1.9.23"
}
group = "ca.eloas.android"
version = "1.0.0"
tasks.test {
useJUnitPlatform()
}
dependencies {
testImplementation(platform("org.junit:junit-bom:5.10.2"))
testImplementation("org.junit.jupiter:junit-jupiter")
testImplementation("org.mockito:mockito-core:5.12.0")
testImplementation("org.mockito:mockito-junit-jupiter:5.12.0")
testImplementation("org.mockito.kotlin:mockito-kotlin:5.3.1")
testImplementation("io.strikt:strikt-jvm:0.34.1")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
kotlin {
jvmToolchain(17)
}
请先登录再写评论。
Test generation for Kotlin is planned for the next major release - 2024.2: https://youtrack.jetbrains.com/issue/LLM-2324. It is already available in the latest EAP build: https://www.jetbrains.com/idea/nextversion. You can install the EAP and test it in the beta phase.
Oh, Mr Ivan, you are pushing me twards the EAP really hard! :-)
Thanks. It generates halfway decent UT on the AI chat, so I'll give this a try.
Thank you for the feedback. The official release of 2024.2 is planned for the end of July.
But of course you are free to use the AI chat in the meantime :)