Quantcast
Channel: JetBrains Developer Community : Thread List - IntelliJ IDEA Users
Viewing all articles
Browse latest Browse all 5661

How to launch a JUnit Robolectric test

$
0
0

Hi,

In a SBT project, I can launch correctly Robolectric tests with this setting:
managedClasspath in Test <++= (platformJars in Android, baseDirectory) map {
   case ((j,_), b) =>
      Seq(Attributed.blank(b / "bin" / "classes"), Attributed.blank(file(j)))
}
In order to debug it with IDEA, I create a Run/Debug configuration of type JUnit.
The problem is that I get this exception:
java.lang.NoClassDefFoundError: android/content/Context
This doesn't happen when launching using: "sbt test".
How can I tell IDEA to use the correct classpath?.
I've set a standard JRE 7 as the alternative JRE of the Run/Debug configuration.
Any help, please?
David

Viewing all articles
Browse latest Browse all 5661

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>