【发布时间】:2017-03-14 22:06:42
【问题描述】:
当我将我的应用的新版本上传到 Google Play 时,我得到了一份非常不错的发布前测试报告,但问题是大部分时间 AI 只是在设置中徘徊,并没有测试实际的用户界面。我想快速、随机地为这些设备预先完成设置。
所以我的问题是,有没有办法检测它是否在那些测试设备上运行?
【问题讨论】:
标签: android testing google-play
当我将我的应用的新版本上传到 Google Play 时,我得到了一份非常不错的发布前测试报告,但问题是大部分时间 AI 只是在设置中徘徊,并没有测试实际的用户界面。我想快速、随机地为这些设备预先完成设置。
所以我的问题是,有没有办法检测它是否在那些测试设备上运行?
【问题讨论】:
标签: android testing google-play
您可以通过以下方式检测预发布测试设备:
private boolean isTestDevice() {
String testLabSetting = Settings.System.getString(getContentResolver(), "firebase.test.lab");
return "true".equals(testLabSetting);
}
【讨论】:
first_open、screen_view 和 session_start 事件。从那里开始,测试将停止工作。有什么方法可以防止这种情况发生吗?它让我的 Firebase 报告变得“脏”。
如果有人来这里寻找如何使用 React Native 执行此操作,请查看 react-native-firebase 包 utils().isRunningInTestLab:https://rnfirebase.io/app/utils#test-lab。
【讨论】: