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

前端 未结 3 1609
长发绾君心
长发绾君心 2020-12-01 13:25

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 Varian

3条回答
  •  一生所求
    2020-12-01 14:06

    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".

提交回复
热议问题