title: How to execute a designated test suite class in Firebase Test Lab
body: <p>I have an espresso test suite class like this</p>
  
  <pre><code>package instrumentedtest;
  
  import org.junit.ClassRule;
  import org.junit.rules.ExternalResource;
  import org.junit.runner.RunWith;
  import org.junit.runners.Suite;
  
  @RunWith(Suite.class)
  @Suite.SuiteClasses({
          Test1.class,
          Test2.class,
          Test3.class
  })
  
  public class POSRuleSuite {
      @ClassRule
      public static ExternalResource testRule = new ExternalResource() {
          @Override
          protected void before() throws Throwable {
              System.out.println("Testing starts.........");
          }
  
          @Override
          protected void after() {
              System.out.println("Testing ends.........");
          }
      };
  }
  </code></pre>
  
  <p>I set up a Firebase test with this suite class in Android Studio. I launch this firebase test from Android Studio and it does work.</p>
  
  <p><a href="https://i.stack.imgur.com/B5fVW.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/B5fVW.jpg" alt="enter image description here"></a></p>
  
  <p>But I failed to execute the test when I launch it from command line with Gcloud command.</p>
  
  <pre><code>gcloud firebase test android run ^
      --type instrumentation ^
      --app POS.apk ^
      --test POS-debug-androidTest.apk ^
      --test-runner-class=org.junit.runners.Suite ^
      --test-targets=instrumentedtest.POSRuleSuite ^
      --device model=Nexus10,version=22,locale=en,orientation=landscape ^
      --timeout 300s
  </code></pre>
  
  <p>Here is output</p>
  
  <pre><code>Uploading [POS.apk] to Firebase Test Lab...
  Uploading [POS-debug-androidTest.apk] to Firebase Test Lab...
  Raw results will be stored in your GCS bucket at [https://console.developers.google.com/storage/browser/test-lab-j9zwyqscmy0rw-k53tazzivjxvu/2017-10-19_14:25:20.055000_jPmA/]
  
  ERROR: (gcloud.firebase.test.android.run) Http error while creating test matrix: ResponseError 400: Invalid test target for instrumentation test: instrumentedtest.POSRuleSuite
  
  C:\git\POS&gt;
  </code></pre>
  
  <p>Does anyone know how to get it work? </p>
  
  <p>Any help is appreciated.</p>