title: How to run with the Android Test Orchestrator from Android Studio IDE instead of command line
body: <p>I would like my tests to use the <a href="https://developer.android.com/training/testing/junit-runner#using-android-test-orchestrator" rel="nofollow noreferrer">Android Test Orchestrator</a> when I run from Android Studio but the documentation only describes <a href="https://developer.android.com/training/testing/junit-runner#using-android-test-orchestrator" rel="nofollow noreferrer">running it from the command line</a>:</p>
  
  <pre><code>./gradlew connectedCheck
  </code></pre>
  
  <p>I prefer to run from Android Studio where I can simply press the play button next to a test and it runs just that test.  I believe Android Studio generates what it calls a "Run/Debug Configuration" for the test.  I believe a Debug Configuration is needed in order to set breakpoints in the test code and/or breakpoints for the code associated with the system under test--I assume breakpoints don't work when you run from the command line.</p>
  
  <p>But does the Run/Debug Configuration employ the Android Test Orchestrator?  From my testing it does not appear to because my app only asks for permissions on a wiped emulator.  I believe the emulator is retaining granted permissions across runs which the Android Test Orchestrator is not supposed to do.</p>
  
  <p>I looked at the Run/Debug Configuration Android Studio generated when I tapped the play button.  It seems like it's using the Android Test Orchestrator because the configuration panel "General" shows the following options:</p>
  
  <p>Instrumentation class: androidx.test.runner.AndroidJUnitRunner
  Instrumentation arguments: clearPackageData true</p>
  
  <p>On the configuration panel "Miscellaneous" I found under "Installation Options" the option "Skip installation if APK has not changed".  It was selected by default.  I tried unselecting it but that didn't clear the permissions on my emulator.</p>
  
  <p>How do I make Android Studio's Run/Debug Configuration employ the Android Test Orchestrator?</p>
  
  <p>I looked for others who've asked this question but couldn't find this specific answer.</p>