android - 使用 React Native 录制 Espresso 测试

标签 android android-studio react-native android-espresso android-espresso-recorder

我正在创建一个 React Native 应用程序,我想用 Espresso 测试它。

当我点击“记录 Espresso 测试”时,出现以下错误:

No suitable Android Application configuration found

Please create an Android Application configuration with a valid module and Default or Specified launch activity.

此外,我手动创建了一个测试,但“运行”按钮对测试不可用。

我找到了这个答案:How to use Espresso UI Testing for React Native? 并为我的资源设置 accessibilityLabel,但这似乎没有任何效果。

我为此使用 Android Studio 2.2.3

最佳答案

我找到了一个解决方案:

如果您将 React Native 项目中的 android 文件夹导入到 Android Studio 中,它将像普通的 Android 项目一样运行,因此您将能够以通常的方式记录 Espresso 测试。

关于android - 使用 React Native 录制 Espresso 测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42295021/

相关文章:

Android通知仅播放声音

android - 使用 linux pc 安装 Apache POI for android

android - 如何在 react native 中更改导航标题颜色?

android - 尝试在 Android 上运行我的 React Native 应用程序时出错

java - Android Tabbed Activity,想太多了吗?

android 保留 gridview 项目 setChecked 不工作

android-studio - 您无法移除所有正式版 APK 和 Android App Bundle

android-studio - Android Studio显示错误的文件内容

android - 如何使用 AccessibilityService 执行触摸并按住手势?

javascript - 如何使用 React js POST JSON 数据?