我正在尝试使用Detox进行设置,并在Bitrise.io上运行。我浏览了react-本机-cli入门指南,并尝试使用detox + Jest在Detox上运行最简单的解毒测试。
我遇到的具体错误是没有定义device和element全局值(请参阅日志或下面的链接)。据我迄今所研究,这是由detox.init从来没有完成。
是否有一些基本的配置与Bitrise,我错过了?detox test命令在本地运行非常好。
我正在使用一个免费的Bitrise帐户,这个项目是公开的。您可以在这里看到一个失败的构建:
回购也是公开的:
提前感谢!
位升错误日志
Example: should have we
当使用react-native-web时,NetInfo在Android和iOS上运行良好,但在web上不起作用。 为了确认web上运行的代码与Android相同,我在控制台上登录componentDidMount,Android和Web都会显示文本。然而,这些事件似乎不适用于web版本。 // src/App.js
import React from 'react';
import { Provider } from 'react-redux';
import store from './utilities/storage/store';
我们的应用程序中有一个toast组件,它为我们的测试添加了相当多的薄片。toast组件显示4秒的动画视图,然后消失。在许多测试中,我需要检查消息内容,以便继续测试。 toast组件是用以下代码实现的: // @flow
import * as React from "react"
import { StyleSheet, View, Animated, Dimensions, Text } from "react-native"
import type {
TextStyle,
ViewStyle,
} from "react-native/
在安卓和iOS模拟器中,应用程序都运行得很好。我试图设置与Jest的Detox为端到端测试我的反应-本地应用程序。在模拟器中,我可以看到一些运动,但应用程序没有启动,我得到了以下错误(除了“未定义的设备”之外,我还得到了" app -debug-androidTest.apk:没有这样的文件或目录“错误,所以不确定原因是什么)。
控制台
>detox test --configuration android.emu.debug
node_modules/.bin/jest e2e --config=e2e/config.json --runInBand
server list
尝试在我的android设备上运行排毒,遇到以下错误: > Configure project :react-native-firebase
react-native-firebase: using React Native prebuilt binary from /Users/m/Desktop/alohapass-business/node_modules/react-native/android
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the depend
在stackoverflow (如)和其他网站上有很多关于这个问题的话题/问题,但让我的问题与其他网站不同的是,我正在研究自动化。所以让我给你更多的细节。
当我在本地机器(我是指我的笔记本电脑)上测试时,我没有问题。我可以运行Espresso测试和所有测试通过。
现在,我想在CI (在我的例子中是Bitrise)上运行这些测试。我创建并运行Emulator。我确认那里没有问题。我有以下脚本:
...
# Check which instrumentation packages have been installed on your device, https://stackoverflow.c
我有一个反应-本地应用程序,使用博览会。位置权限在android上工作,但在iOS上不起作用。在真正的iPhone (iOS 14.4.2版)上,它什么也不做。在模拟器上,我得到以下错误消息:
未处理的承诺拒绝:错误:执行此操作需要LOCATION_FOREGROUND权限。在node_modules/react-native/Libraries/BatchedBridge/NativeModules.js:103:50 in promiseMethodWrapper at node_modules/@unimodules/react-native-adapter/build/NativeMo
我刚刚在一个未更改的Android项目上触发了一个新的Bitrise构建,发现现在发生了这个错误:
FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all files for configuration ':app:[REDACTED]CompileClasspath'.
> Could not find play-services-identity.aar (com.google.android.gms:play-services-identity:11.8.0)