title: Android JUnitRunner Empty Test Suite: No Test Results
body: <p>I'm having trouble running tests in Android Studio. I've read through a load of posts with the same problem here on Stack Overflow, but to no avail. Just to be clear, I want to test in the emulator and not in the JVM.</p>
  
  <p>Run configuration:</p>
  
  <p><a href="https://i.stack.imgur.com/9g68f.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9g68f.png" alt="run-config"></a></p>
  
  <p>Output:</p>
  
  <pre><code>Running tests
  Test running startedTest running failed: No test results
  Empty test suite.
  </code></pre>
  
  <p>Build.gradle:</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 23
      buildToolsVersion "23.0.0"
  
      defaultConfig {
          applicationId "ntnu.stud.markul.crowdshelf"
          minSdkVersion 19
          targetSdkVersion 23
          versionCode 1
          versionName "1.0"
  
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  
  dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
      compile 'com.android.support:appcompat-v7:23.0.1'
      // Unit testing dependencies
      androidTestCompile ('com.android.support.test:rules:0.3') {
          exclude group: 'com.android.support', module: 'support-annotations'
      }
      androidTestCompile('com.android.support.test:runner:0.3') {
          // Necessary if your app targets Marshmallow (since the test runner
          // hasn't moved to Marshmallow yet)
          exclude group: 'com.android.support', module: 'support-annotations'
      }
      androidTestCompile 'junit:junit:4.12'
      testCompile 'junit:junit:4.12'
  }
  </code></pre>
  
  <p>The test class (located in /src/androidTest/java/com/appname/app/):</p>
  
  <pre><code>@RunWith(AndroidJUnit4.class)
  public class NetworkAndDBInstrumentationTest extends ActivityInstrumentationTestCase2&lt;MainActivity&gt; {
      private MainActivity mActivity;
      public NetworkAndDBInstrumentationTest() {
          super(MainActivity.class);
      }
  
      @Before
      public void setUp() throws Exception {
          super.setUp();
  
          // Injecting the Instrumentation instance is required
          // for your test to run with AndroidJUnitRunner.
          injectInstrumentation(InstrumentationRegistry.getInstrumentation());
          mActivity = getActivity();
      }
  
      @Test
      public void typeOperandsAndPerformAddOperation() {
          NetworkController.getCrowd("55f01f29f0a5fad2120bb1db");
          System.out.print("ok");
          Log.d("1TEST", "1TEST");
      }
  
      @After
      public void tearDown() throws Exception {
          super.tearDown();
      }
  }
  </code></pre>