久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

如何為自動化的 android 測試提供登錄憑據?

How to provide login credentials to an automated android test?(如何為自動化的 android 測試提供登錄憑據?)
本文介紹了如何為自動化的 android 測試提供登錄憑據?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

限時送ChatGPT賬號..

我正在尋找一種方法來提供登錄"到我的應用程序,以便自動測試已登錄"并可以測試整個應用程序.目前它當然被登錄屏幕阻止了.

I'm looking for a way to "provide a login" to my app so an automated test "is logged in" and can test the entire app. Currently it's of course blocked by the login-screen.

因為我使用 SmartLock 作為密碼,這可能是提供一些測試憑據的機會 - 但我不知道如何.

Because I'm using SmartLock for Passwords, this might be a chance to provide some credentials for the test - but I don't know how.

是否有一些最佳實踐可以在測試期間提供憑據以/跳過登錄?我可以想到一個特殊的 buildType/-flavor 來模擬登錄,但這樣它就不能用于測試發(fā)布版本.

Is there some best-practice to provide credentials to / skip the login during a test? I could think of a special buildType / -flavor which is mocking the login but this way it can't be used to test a release build.

如果我可以測試最終發(fā)布版本,并且在測試成功后可以上傳到商店,那就太好了.這樣,我也可以使用 PlayStore 中嵌入的發(fā)布前報告(這真的很棒).

It would be great when I could test a final release build which can be uploaded to the store when the test succeeds. This way, I could use the embedded pre-launch-reports in the PlayStore as well (which would be really nice).

推薦答案

進入Firebase Console->Test Lab->選擇Dimensions,然后點擊

Go to Firebase Console->Test Lab->Select Dimensions, then click

顯示高級選項

然后尋找

測試帳戶憑據(可選)

然后填寫如下:

輸入用戶名資源:您的用戶名(電子郵件)EditText 資源的名稱,跳過 R.id 部分,因此對于 R.id.edit_text_email 輸入 edit_text_email

Enter username resource : name of your username (email) EditText resource, skipping the R.id part, so for R.id.edit_text_email input edit_text_email

輸入密碼資源:同上,但輸入密碼.同樣,跳過 R.id,例如.edit_text_password

Enter username :您將用于測試的用戶名或電子郵件,例如.test@mywebsite.com

輸入密碼 :您將用于測試的密碼,例如 testTEST123

似乎 Robo(測試機器人)在找到使用 ID 資源指定的 EditTexts 后立即輸入憑據,但如果您有其他身份驗證選項,則可能需要一些時間來確定單擊哪個按鈕登錄如使用 Google 登錄"和使用 Facebook 繼續(xù)".在其他服務中嘗試了幾分鐘后,似乎幸運地按下了正確的按鈕以使用您提供的憑據繼續(xù)進行身份驗證.

It seems Robo (the test bot) types in the credentials as soon as it finds the EditTexts specified with the ID resources, yet may take a little while figuring out which button to click to log in if you have other auth options such as 'Sign in with Google' and 'Continue with Facebook'. After a few minutes of attempts in other services it seems to luckily press the right button to continue through the authentication using the credentials you provide.

在撰寫本文時,無法編寫登錄行為腳本并因此建議使用哪些按鈕進行身份驗證,因此只需使用上述方法并給 Robo 足夠的測試時間(測試超時),以防它在沒有單擊右鍵的情況下停留一段時間.

At the time of writing this, there is no way to script a login behaviour and as such suggest which buttons to use for authentication, so just use the method above and give Robo enough test time (Test timeout in the Console) in case it sticks around without clicking the right button for a while.

如果您為 Robo 提供 Sign in With Google 按鈕以使用其自己的 Google 憑據登錄,請記住,如果您提供 Test account 憑據,這將不起作用.IE.為了能夠使用 Sign in with Google,請確保您沒有提供任何其他登錄憑據,否則會失敗.

If you provide Sign in With Google button for Robo to use its own Google credentials to sign in, remember that this will not work if you provide the Test account credentials. Ie. to be able to use Sign in with Google make sure your haven't provided any other login credentials, otherwise it will fail.

注意:您可以讓 Robo 使用類似的方法填寫其他 EditText 字段 - 檢查 測試實驗室文檔了解更多信息.

Note: You can make Robo fill in other EditText fields using a similar method - check the Test Lab documentation for more info.

這篇關于如何為自動化的 android 測試提供登錄憑據?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Cut, copy, paste in android(在android中剪切、復制、粘貼)
android EditText blends into background(android EditText 融入背景)
Change Line Color of EditText - Android(更改 EditText 的線條顏色 - Android)
EditText showing numbers with 2 decimals at all times(EditText 始終顯示帶 2 位小數的數字)
Changing where cursor starts in an expanded EditText(更改光標在展開的 EditText 中的開始位置)
EditText, adjustPan, ScrollView issue in android(android中的EditText,adjustPan,ScrollView問題)
主站蜘蛛池模板: 黄色男女网站 | 国产精品日韩高清伦字幕搜索 | 成人精品一区二区三区中文字幕 | 精品国产女人 | 欧美一级视频免费看 | 日批免费观看 | 国产午夜av片 | 亚洲乱码国产乱码精品精98午夜 | 小川阿佐美pgd-606在线 | 久久精品16 | 欧美一级二级视频 | 99国产精品久久久 | 人人种亚洲| 久久精品久久精品 | 亚洲国产成人在线视频 | 欧美亚洲国产成人 | 在线欧美 | 欧美日韩中文在线观看 | 午夜极品| 18gay男同69亚洲网站 | 成人在线视频免费看 | 96国产精品久久久久aⅴ四区 | 国产精品久久久久久久久久久久久 | 午夜影院在线观看视频 | 亚洲欧美一区二区三区视频 | 欧美一区二区在线观看 | 亚洲精品黄色 | 美女在线一区二区 | 日韩有码在线播放 | 欧洲尺码日本国产精品 | 欧美午夜一区二区三区免费大片 | 我想看一级黄色毛片 | 国产真实精品久久二三区 | 精品视频在线观看 | 天天天操 | 中文无吗| 国产欧美视频一区二区三区 | 男女午夜免费视频 | 日韩欧美在线播放 | 亚洲精品9999 | 日韩av免费在线观看 |