4

Some time ago it was possible to show/hide Test Artifact selector this way.

But for now I cannot find opportunity to do this. So any suggestions?

Here are screenshots from Android Studio.
Gradle->Instrumental
Build variants

Community
  • 1
  • 1
Mody
  • 204
  • 2
  • 7

1 Answers1

2

Previous to Android 2.0

Previous to Android 2.0 you had to choose one of the two types from the Test Artifacts setting in the Build Variants window. You could only run tests of that type, and would only see tests of that type in the project overview.

Unit Tests selection, before Android Studio 2.0

Unit Tests selection, before Android Studio 2.0

Android Instrumentation Tests selection, before Android Studio 2.0

Android Instrumentation Tests selection, before Android Studio 2.0

Android Studio 2.0

Android Studio 2.0, however, has a unified testing view. Now you can view and run both kinds of tests, eliminating the need to choose a test artifact.

enter image description here

Thanks to Huyen Tue Dao for the great article about this topic and other more which were difficult to understand at the beginning.

Jorge Casariego
  • 21,948
  • 6
  • 90
  • 97