問題描述
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 測試錄制功能的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!