Android Studio 2.2 中的 Espresso 测试录制功能 [英] Espresso test recording feature in Android Studio 2.2

本文介绍了Android Studio 2.2 中的 Espresso 测试录制功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

解决方案

6月9日更新:

最新的android-developers博客

<块引用>

Espresso 测试记录器:有时编写 UI 测试可能很乏味.借助 Record Espresso UI 测试功能,现在创建测试就像使用您的应用程序一样简单.Android Studio 将捕获您的所有 UI 交互并将它们转换为完全可重用的 Espresso 测试,您可以在本地甚至在 Firebase 测试实验室中运行该测试.要使用记录仪,请转到运行"菜单并选择记录 Espresso 测试".

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

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

<小时>

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

<块引用>

现在创建测试就像使用您的应用一样简单.在调试模式下运行您的应用并启用录制,此功能将捕获 UI 事件并将其转换为您可以在本地甚至在 Firebase 测试实验室中运行的 Espresso 测试.

来自 venturebeat

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

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

<小时>

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

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

In Android Studio 2.2 there is supposed to be a test recording function? Where do I find it and how do I use it?

解决方案

Update june 9th:
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

Screenshot of my pc:

Download it here or patch directly from android studio preview 2.2


Update may 30:
Android Studio 2.2 preview 2 is out, but no 'Record Espresso Test' option yet.

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!

From the changelog.


Update:
It was not in the Advanced Espresso presentation as I expected, but in What's new in Android development tools (credit to flackery). They show where to find it:

It's also explained in the 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.

However there is no way to get that option in the current release, updating all (platform)tools etc won't make a difference either.

For now we can only assume that this was unintentionally left out, and will be included in the first next release.


The only sensible thing I could find about this is

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.

From venturebeat

Running in debug is simple, but enabling recording.. I'm not sure what they mean by that. There is a recording option, but that is for capturing the screen and saving it to a mp4 file.

There is currently nothing to be found on the net, and nothing in android studio itself either, that explains this feature in more detail than "it's there".


There will however be a talk at Google I/O today, Advanced Espresso, where they will talk about this new feature and I expect it to be clearer after that.

I will update my answer once I've seen the presentation.

这篇关于Android Studio 2.2 中的 Espresso 测试录制功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆