Android Studio 2.2 中的 Espresso 测试录音功能

Espresso test recording feature in Android Studio 2.2

AndroidStudio 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

我的电脑截图:

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


5 月 30 日更新:
Android Studio 2.2 预览版 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 中(归功于 flackery)。他们显示在哪里可以找到它:

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 文件。

目前在网上找不到比 "it's there".

更详细地解释此功能的内容,android studio 本身也找不到任何内容。

不过,今天 Google I/O 会有一个演讲,Advanced Espresso,他们会在那里讨论这个新功能,我希望在那之后会更清楚。

看完介绍后我会更新我的答案。

如 Google I/O 会话 'What's new in Android development tools' 中所述,我们可以从 'Run' 菜单访问 'Record Espresso Test'。

很遗憾,此项目在 Android Studio 2.2 Preview 1 中不可用,可能会在未来的版本中提供。

它现在与 Android Studio 2.2 Preview 3 一起使用。请在此处发送所有反馈和问题:https://code.google.com/p/android/issues/entry?template=Espresso%20Test%20Recorder%20Bug