UiAutomator UIAutomator 2.0 发布了

lucker6667 · 2015年03月13日 · 最后由 testBlue 回复于 2016年08月30日 · 1520 次阅读

Android Developers
Shared publicly - 4:52 AM
#AndroidDev

We’re pleased to announce the release of UIAutomator 2.0! This version is a significant update from the previous release. Most importantly, UI Automator is now based on Android Instrumentation and you can build and run tests with the ‘./gradlew connectedCheck’ command.

This release is packaged with the Android Testing Support Library so that we will be able to provide updates more frequently in the future. You can get started with UIAutomator by downloading the latest Android Support Repository through the SDK Manager.

Documentation is available on developers.android.com (http://goo.gl/wJq00a). Happy Testing!

共收到 8 条回复 时间 点赞

谢谢分享!

大致看了一下官方文档的更新,大致内容是把 Android 的自动化测试工具合并成了一个 Testing Support Library(包含在最新的 Android Support Repository 中,可在 SDK Manager 里面下载安装),里面包含 AndroidJUnitRunner(一个 Junit test runner,Android 2.2 (API level 8) or higher), Espresso(UI 测试框架,可用来做单个应用的功能测试,偏向白盒,Android 2.2 (API level 8) or higher), UI Automator(UI 测试框架,可用来做跨应用的功能测试,偏向黑盒,Android 4.3 (API level 18) or higher)。

PS: 那个短连接我老是打不开,补充一个长连接:http://developer.android.com/tools/testing-support-library/index.html

如果能支持 WebView 就好了……

这个增加不错的。
AndroidJUnitRunner: JUnit 4-compatible test runner for Android
Espresso: UI testing framework; suitable for functional UI testing within an app
UI Automator: UI testing framework; suitable for cross-app functional UI testing across system and installed apps

变成公共的,看着很爽啊~~更新好来用用

现在发什么新的框架都有限制, 支持老版本是硬需求.

好消息

#2 楼 @weamylady 估计按照 google 规划,webview 是 chromedriver 来负责的,android 的测试框架专心搞原生应用。

请问下 2.0 支持建立 Context 吗,因为牵扯到在自动化脚本中发送广播,老版本测试框架是不支持的

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册