0

I am starting with Robolectric framework 3.0. for android testing. I am goingthrough there site and they mention the first step as adding in build gradle

testCompile "org.robolectric:robolectric:3.0"

I have done that and did a complete clean build. Now once I start writing my first test case I get comilation issue-- cannot find symbol class RunWith for the annotation @

RunWith(RobolectricGradleTestRunner.class)

Please tell me, what I am missing? I thought mavencentral() will download the respective jar file.

Thanks in advance.

indi mars
  • 133
  • 3
  • 8

1 Answers1

1

You can refer this this link.

Make sure your test case locations are proper.

Android Studio defaults to looking for tests in the following locations: Unit Tests => src/test/java

Nicks
  • 16,030
  • 8
  • 58
  • 65
  • Can you also check -- http://stackoverflow.com/questions/31867722/android-roboelectric-3-0-testing-next-activity-choosing-from-multiple-activities – indi mars Aug 07 '15 at 00:11