- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试设置 detox在我的应用程序上运行 e2e 测试(react native + expokit)。
正如我在 https://github.com/wix/Detox/issues/1627 中提到的,我的测试一直超时
Waiting for network requests to finish.: (
"http://10.4.12.38:19001/symbolicate",
"http://10.4.12.38:19001/symbolicate",
"http://10.4.12.38:19001/symbolicate",
"http://10.4.12.38:19001/symbolicate",
"http://10.4.12.38:19001/onchange"
)
detoxURLBlacklistRegex
但它并不能解决问题。正如我在
https://github.com/wix/Detox/issues/1627 中所说的我认为禁用实时重新加载会使测试通过,但事实并非如此
总是 这种情况 - 有时会,有时会超时。这是我的
init.js
:
const detox = require('detox');
const adapter = require('detox/runners/jest/adapter');
const specReporter = require('detox/runners/jest/specReporter');
const config = require('../package.json').detox;
// Set the default timeout
jest.setTimeout(30000);
jasmine.getEnv().addReporter(adapter);
// This takes care of generating status logs on a per-spec basis. By default, jest only reports at file-level.
// This is strictly optional.
jasmine.getEnv().addReporter(specReporter);
beforeAll(async () => {
await detox.init(config, {
launchApp: false,
});
await device.launchApp({
permissions: { notifications: 'YES' },
launchArgs: {
detoxPrintBusyIdleResources: 'YES',
detoxURLBlacklistRegex:
'.*://10.4.12.38.*',
},
});
});
beforeEach(async () => {
await adapter.beforeEach();
});
afterAll(async () => {
await adapter.afterAll();
await detox.cleanup();
});
detox[55327] TRACE: [Detox.js/DETOX_BEFORE_EACH] running test: "Example should show hello screen after tap"
detox[55327] TRACE: [ArtifactsManager.js/LIFECYCLE] artifactsManager.onBeforeEach({
title: 'should show hello screen after tap',
fullName: 'Example should show hello screen after tap',
status: 'running'
})
detox[55327] TRACE: [AsyncWebSocket.js/WEBSOCKET_SEND] {"type":"reactNativeReload","params":{},"messageId":-1000}
detox[55327] TRACE: [DetoxServer.js/MESSAGE] role=tester action=reactNativeReload (sessionId=6ee3a6df-152d-a069-f95a-ecd53e7fc872)
detox[55327] TRACE: [AsyncWebSocket.js/WEBSOCKET_SEND] {"type":"invoke","params":{"target":{"type":"Invocation","value":{"target":{"type":"EarlGrey","value":"instance"},"method":"detox_selectElementWithMatcher:","args":[{"type":"Invocation","value":{"target":{"type":"Class","value":"GREYMatchers"},"method":"matcherForAccessibilityID:","args":[{"type":"NSString","value":"hello_button"}]}}]}},"method":"performAction:","args":[{"type":"Invocation","value":{"target":{"type":"Class","value":"GREYActions"},"method":"actionForTap","args":[]}}]},"messageId":2}
detox[55327] TRACE: [DetoxServer.js/MESSAGE] role=tester action=invoke (sessionId=6ee3a6df-152d-a069-f95a-ecd53e7fc872)
Example: should show hello screen after tap [FAIL]
Example: should show world screen after tap
detox[55327] TRACE: [Detox.js/DETOX_AFTER_EACH] failed test: "Example should show hello screen after tap"
detox[55327] TRACE: [ArtifactsManager.js/LIFECYCLE] artifactsManager.onAfterEach({
title: 'should show hello screen after tap',
fullName: 'Example should show hello screen after tap',
status: 'failed',
timedOut: true
})
detox[55327] WARN: [Client.js/PENDING_REQUESTS] App has not responded to the network requests below:
(id = 2) invoke: {"target":{"type":"Invocation","value":{"target":{"type":"EarlGrey","value":"instance"},"method":"detox_selectElementWithMatcher:","args":[{"type":"Invocation","value":{"target":{"type":"Class","value":"GREYMatchers"},"method":"matcherForAccessibilityID:","args":[{"type":"NSString","value":"hello_button"}]}}]}},"method":"performAction:","args":[{"type":"Invocation","value":{"target":{"type":"Class","value":"GREYActions"},"method":"actionForTap","args":[]}}]}
(id = -1000) reactNativeReload: {}
That might be the reason why the test "Example should show hello screen after tap" has timed out.
最佳答案
您是否尝试过转义特殊字符?它在 detox docs 中说我们可以禁用 EarlGrey's network synchronization mechanism通过提供正则表达式跳过某些 URL,在首选端点上建立机制。
例如,
beforeAll(async () => {
await device.setURLBlacklist([
'.*10\.4\.12\.38.*'
]);
});
关于react-native - 排毒:WAITING网络请求完成超时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57769584/
使用 Jest-Circus 作为测试运行器运行 detox 17.4.3 我在使用 iOS 模拟器时遇到以下错误。 detox[18766] WARN: [Client.js/PENDING_RE
在使用 Detox 进行测试时,我在按钮上执行 tap() 时遇到问题。 Log In 我们的测试看起来像这样: const emailInput = element(by.id('e
在我的测试中,我想在“取消升级”按钮显示时模拟点击: it('should be in home menu', async () => { await waitFor(element(by.id(
我正在使用来自 react-native 的警报。 如何按警报消息上的“注销”按钮进行排毒? 我尝试使用 await element(by.text('Log out')).tap(); 但是我收到“
我正在使用 detox e2e 为我的 react-native 应用程序创建测试用例。长话短说,我在组件的渲染函数中有一个按钮,该按钮从左向右过渡。我已经为该按钮提供了一个唯一的测试 ID。在我的测
我在我的 react-native 应用程序中为 e2e 测试实现了 Detox,我有 2 个测试: 启动 -> 未登录 -> 显示登录表单 -> 主屏幕 启动 -> 记录 -> 主屏幕 授权信息存储
我想知道如何使用 native 键盘输入数字,然后使用“\n”在 Detox 的普通字符串上像 typeText 一样输入它 //await typeText('${screen_id}_screen
我们的应用程序中有一个 toast 组件,它为我们的测试增加了相当多的脆弱性。 toast 组件显示动画 View 4 秒,然后消失。在很多测试中,我需要检查消息内容是什么才能继续测试。 Toast
我已按照此处的 Android 排毒指南安装到我的 react-native 项目 - https://github.com/wix/Detox/blob/master/docs/Introducti
我正在尝试设置 detox在我的应用程序上运行 e2e 测试(react native + expokit)。 正如我在 https://github.com/wix/Detox/issues/162
在过去的两天里,我一直在寻找使用 Expo + Detox + CircleCI 的良好设置,以便应用程序可以在 CI 过程中构建。 在本地,我可以通过下载 Exponent.app 并放入 bin
输入用户电子邮件地址后,我希望 Detox 按下一步移动到密码字段。 我试图通过元素 ID 查找密码字段并调用 .tap()焦点,但键盘部分遮挡了密码字段,并且未能通过 75% 的可见性标准。 Err
我不熟悉排毒和移动自动化。我想使用 detox 在通知中心点击 iOS 推送通知。或者是否有任何其他工具可以与 detox 一起使用,以便在 iOS 上点击通知? 有什么建议吗?谢谢 最佳答案 在您的
我正在尝试使用 detox 测试我的 react-native 应用程序,等待文本输入可见并在其中键入文本。我的 spec JS 文件 如下所示: describe('FiestTest', () =
我在最新版本上使用 detox,此提交 ( https://github.com/wix/Detox/commit/2507c1e4325936ed9f46c0f64571fa581c71ff5f )
尝试从 Detox 7.3.4 升级到 8.1.1 即使提供 --configuration,它似乎是从苹果电视而不是我提供的手机加载的 包.json: "detox": { "confi
使用从命令行启动应用程序detox test --configuration ios.sim.debug 通过代码启动应用程序await device.launchApp({ permissions:
为您的帮助干杯。我对 Detox、React Native、Macs、Xcode 和在 StackOverflow 上发帖(新工作)非常陌生,如果我遗漏了细节,我深表歉意。 我遵循以下指南: http
我是一名优秀的程序员,十分优秀!