【问题标题】:Android espresso tests failing in emulator passing in physical deviceAndroid espresso 测试在模拟器传递物理设备时失败
【发布时间】:2022-11-20 05:45:00
【问题描述】:

我在 android 项目中的 Espresso 测试主要在模拟器中失败,因为在传递物理设备时我对两个设备使用相同的配置。

要遵循的任何想法或提示。

【问题讨论】:

    标签: android kotlin user-interface testing android-espresso


    【解决方案1】:

    这件事情是由很多原因导致的。您应该阅读日志。

    1. 模拟器和物理设备的不同 API。
    2. 模拟器和物理设备的屏幕尺寸不同。

      等等

    【讨论】:

      【解决方案2】:

      尝试使用很棒的库Kaspresso,他们在 Espresso 之上添加了额外的钩子,因此 UI 测试不会那么不稳定。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2012-07-08
        • 2020-11-13
        • 2015-08-07
        • 1970-01-01
        • 2017-11-21
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多