title: Android : Espresso test FW throwing "No tests found.." exception
body: <p>I'm trying to start with Espresso FW for automatized UI testing by this article:</p>
  
  <p><a href="http://developer.android.com/training/testing/ui-testing/espresso-testing.html" rel="nofollow">http://developer.android.com/training/testing/ui-testing/espresso-testing.html</a></p>
  
  <p>So i installed all dependencies and i created following testing class for the MainActivity.</p>
  
  <pre><code>import android.support.test.InstrumentationRegistry;
  import android.test.ActivityInstrumentationTestCase2;
  import org.junit.Before;
  import org.junit.Test;
  
  import activities.MainActivity;
  import static android.support.test.espresso.Espresso.onView;
  import static android.support.test.espresso.action.ViewActions.click;
  import static android.support.test.espresso.action.ViewActions.closeSoftKeyboard;
  import static android.support.test.espresso.action.ViewActions.typeText;
  import static android.support.test.espresso.assertion.ViewAssertions.matches;
  import static android.support.test.espresso.matcher.ViewMatchers.withId;
  import static android.support.test.espresso.matcher.ViewMatchers.withText;
  
  
  /**
   * Created by xxx on 19.8.2015.
   */
  public class MainActivityTest extends ActivityInstrumentationTestCase2&lt;MainActivity&gt; {
  
      private MainActivity mActivity;
  
      public MainActivityTest() {
          super(MainActivity.class);
      }
  
      @Before
      public void setUp() throws Exception {
          super.setUp();
          injectInstrumentation(InstrumentationRegistry.getInstrumentation());
          mActivity = getActivity();
      }
  
      @Test
      public void buttonShouldUpdateText(){
          onView(withId(R.id.goToSecondActivityBtn)).perform(click());
          //onView(withId(getResourceId("Click"))).check(matches(withText("Hello world!")));
      }
  }
  </code></pre>
  
  <p>But if i clicked on the "Run activity test" button i always get following error message:</p>
  
  <pre><code>Running tests
  Test running started
  junit.framework.AssertionFailedError: No tests found in com.example.mypackage.test.MainActivityTest
  at junit.framework.Assert.fail(Assert.java:50)
  at junit.framework.TestSuite$1.runTest(TestSuite.java:97)
  at junit.framework.TestCase.runBare(TestCase.java:134)
  at junit.framework.TestResult$1.protect(TestResult.java:115)
  at junit.framework.TestResult.runProtected(TestResult.java:133)
  at android.support.test.internal.runner.junit3.DelegatingTestResult.runProtected(DelegatingTestResult.java:90)
  at junit.framework.TestResult.run(TestResult.java:118)
  at android.support.test.internal.runner.junit3.AndroidTestResult.run(AndroidTestResult.java:49)
  at junit.framework.TestCase.run(TestCase.java:124)
  at android.support.test.internal.runner.junit3.NonLeakyTestSuite$NonLeakyTest.run(NonLeakyTestSuite.java:63)
  at junit.framework.TestSuite.runTest(TestSuite.java:243)
  at junit.framework.TestSuite.run(TestSuite.java:238)
  at android.support.test.internal.runner.junit3.DelegatingTestSuite.run(DelegatingTestSuite.java:103)
  at android.support.test.internal.runner.junit3.AndroidTestSuite.run(AndroidTestSuite.java:63)
  at android.support.test.internal.runner.junit3.JUnit38ClassRunner.run(JUnit38ClassRunner.java:90)
  at org.junit.runners.Suite.runChild(Suite.java:128)
  at org.junit.runners.Suite.runChild(Suite.java:27)
  at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
  at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
  at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
  at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
  at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
  at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
  at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
  at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
  at android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:54)
  at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:228)
  at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1853)
  </code></pre>
  
  <p>I tried to use different annotations by this article:</p>
  
  <p><a href="http://www.vogella.com/tutorials/AndroidTestingEspresso/article.html" rel="nofollow">http://www.vogella.com/tutorials/AndroidTestingEspresso/article.html</a></p>
  
  <p>But without the luck.</p>
  
  <p>How can i solve it to run a simple test on Main Activity please ?</p>
  
  <p>Many thanks for any advice.</p>