Can't use TestNG with Kotlin


#1

I can't get TestNG to work at all with Kotlin, IDEA doesn't even see the symbols from Gradle.

It works fine with JUnit:

dependencies {
  testCompile 'junit:junit:4.12'

``

dependencies {

 
  testCompile ‘org.testng:testng:6.9.4’
}

After refreshing my Gradle project: /uploads/kotlinlang/original/1X/568faea5e3ecfdbc2671974392ae2b6769608c75.png

Using IDEA 14.1.4 and:

classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:0.12.613"
classpath "org.jetbrains.kotlin:kotlin-stdlib:0.12.613"

#2

I don't seem to be able to reproduce the problem. Do you see TestNG in the Project view under "External libraries"? Can you navigate to org.testng.annotations.Test using the Goto Class action? Does File | Invalidate Caches help?


#3

I just restarted and tried again and this time, everything works fine. I could have sworn I did this multiple times already... oh well.

Thanks! I’ll close the associated issue.