Test Artifact selector missing/gone from Build Variants in Android Studio 2 Beta 5

Android StudioAndroid Gradle-PluginAndroid Studio-2.0-Beta5

Android Studio Problem Overview


In order to run Instrumentation Tests from within Android Studio, I typically select "Android Instrumentation Tests" as the test artifact to be built, via the Build Variants window. I recently upgraded to Android Studio 2 Beta 5, and the "Test Artifact" selector is no longer visible. Where did it go? Has some other configuration taken its place?

Android Studio Solutions


Solution 1 - Android Studio

I discovered this in the release notes for Android Studio 2.0 Preview 5: "The experimental test artifacts feature (where both unit test and instrumentation tests are enabled simultaneously in the IDE) has been improved further and is now enabled by default."

To disable the simultaneous building of unit and instrumentation tests, go here: File Menu -> Settings -> Build, Execution, Deployment -> Build Tools -> Gradle -> Experimental. Then uncheck this: "Enable all test artifacts (Unit Test and Instrumentation Test) in Android projects".

Rather than navigate through Settings, you can also use the search box at the top of the Settings dialog, and just search for "instrumentation".

Solution 2 - Android Studio

From what I see, in Android Studio 2.3.3, this option is gone 4 ever.

@markproxy: this because that feature is no longer experimental but is embedded in Android Studio as a feature, and there is no need to disable it, I suppose.

enter image description here

Here, for anyone needs, a link to the Android Unit Test guide: Getting Started with Testing (Instrumented Unit Tests included)

Solution 3 - Android Studio

Just as @markproxy said there is no "Test artifact" with "Android Instrumentation Tests" to select from. This window looked like this in Android Studio 1.5x releasesenter image description here

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionMark McClellandView Question on Stackoverflow
Solution 1 - Android StudioMark McClellandView Answer on Stackoverflow
Solution 2 - Android StudioingitalyView Answer on Stackoverflow
Solution 3 - Android Studiokosiara - Bartosz KosarzyckiView Answer on Stackoverflow