android - Android Studio 2.2 中的 Espresso 测试录制功能

标签 android automated-tests android-espresso android-studio-2.2 android-espresso-recorder

Android Studio 2.2 应该有测试录音功能吧?我在哪里可以找到它以及如何使用它?

最佳答案

6 月 9 日更新:
It is now available with android studio 2.2 preview 3!

Espresso Test Recorder
Demo of the Espresso Test Recorder shown at IO is now included in Preview 3

我的电脑截图:
enter image description here

下载here或直接从 android studio preview 2.2 打补丁


5 月 30 日更新:
Android Studio 2.2 preview 2 已经发布,但还没有“Record Espresso Test”选项。

Unfortunately the Espresso Test Recorder is still not in this build; we're addressing a few more issues and then hope to have it ready in the next build!

来自 changelog .


更新:
正如我所料,它不在Advanced Espresso 演示文稿中,而是在What's new in Android development tools 中。 (归功于蹩脚)。他们显示在哪里可以找到它:

enter image description here

latest android-developers blog 中也有解释。

Espresso Test Recorder: Sometimes writing UI tests can be tedious. With the Record Espresso UI tests feature, creating tests is now as easy as just using your app. Android Studio will capture all your UI interactions and convert them into a fully reusable Espresso Test that you can run locally or even on Firebase Test lab. To use the recorder, go to the Run menu and select Record Espresso Test.

但是,在当前版本中无法获得该选项,更新所有(平台)工具等也不会产生影响。

目前我们只能假设这是无意中遗漏的,并将包含在下一个版本的第一个版本中。


我能找到的唯一明智的事情是

Creating tests is now as easy as using your app. Run your app in debug mode and enable recording, and this feature will capture UI events and convert them into Espresso Tests that you can run locally or even in the Firebase Test lab.

来自 venturebeat

在调试中运行很简单,但启用录制.. 我不确定他们的意思。有一个录制选项,但用于捕获屏幕并将其保存为 mp4 文件。

目前在网上找不到任何东西,android studio 本身也没有任何东西比“它就在那里”更详细地解释了这个功能。


不过,今天将在 Google I/O 上发表演讲,Advanced Espresso ,他们将在哪里谈论这个新功能,我希望之后会更清楚。

我会在看到演示文稿后更新我的答案。

关于android - Android Studio 2.2 中的 Espresso 测试录制功能,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37318922/

相关文章:

asp-classic - 经典 ASP 的自动化测试

java - 使用 JUnit 作为验收测试框架

android - 在 Espresso android 中获取当前 Activity

android - 如何使用 Espresso 将时间设置为 MaterialDateTimePicker

java - OnCreate 强制 Activity 崩溃 : ImageButton ClassCastException

Android模拟器偶尔无法启动网络

java - 是否有任何类似于 Maven2 约定的 Ant 约定?

android - Espresso : click first item in ListView inside a ViewPager

android - 自定义ExpandableListView时默认箭头继续出现

android - 将 byteArray 转换为从 sqlite 检索的位图