android studio test artifact,Test Artifact selector missing/gone from Build Variants in Android Stud...

问题

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?

回答1:

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

回答2:

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 releases

回答3:

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.

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

来源:https://stackoverflow.com/questions/35708263/test-artifact-selector-missing-gone-from-build-variants-in-android-studio-2-beta

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值