React native 无法使用排毒和玩笑进行平行测试

React native 无法使用排毒和玩笑进行平行测试,react-native,jestjs,detox,React Native,Jestjs,Detox,我在Stack Overflow上看到过类似的问题,但我不觉得我们遇到了相同的问题,而且已经一年没有答案了 我已经按照文档进行了操作,所有的测试都很正常,但是当我打开4个模拟器来尝试并行测试时,只有一个模拟器做出了反应 package.json tests/detox/jest.config.js module.exports={ 预设:“ts笑话”, 测试环境:“节点”, SetupFileAfterEnv:['./init.ts'] }; 初始化 这是我用来启动测试的命令,在4个IOS模拟

我在Stack Overflow上看到过类似的问题,但我不觉得我们遇到了相同的问题,而且已经一年没有答案了

我已经按照文档进行了操作,所有的测试都很正常,但是当我打开4个模拟器来尝试并行测试时,只有一个模拟器做出了反应

package.json

tests/detox/jest.config.js

module.exports={
预设:“ts笑话”,
测试环境:“节点”,
SetupFileAfterEnv:['./init.ts']
};
初始化

这是我用来启动测试的命令,在4个IOS模拟器运行并准备好之后

解毒测试-l警告-w 4./所有测试的路径

依赖关系
  • 卡塔利纳马科斯酒店
  • xed版本11.4
  • 排毒:^16.0.2
  • 笑话:^24.9.0
  • ts笑话:^24.1.0
{
 ...
  "detox": {
    "configurations": {
      "ios.sim.debug": {
        "binaryPath": "ios/build/AppName/Build/Products/Debug-iphonesimulator/AppName.app",
        "build": "xcodebuild -project ios/AppName.xcodeproj -scheme AppName -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build",
        "type": "ios.simulator",
        "device": {
          "type": "iPhone 11"
        }
      }
    },
    "test-runner": "jest --detectOpenHandles --verbose",
    "runner-config": "tests/detox/jest.config.js"
  }
}
import { cleanup, init } from 'detox';
const adapter = require('detox/runners/jest/adapter');

const config = require('../../package.json').detox;

jest.setTimeout(90000);

jasmine.getEnv().addReporter(adapter);

beforeAll(async () => {
  await init(config, { initGlobals: false });
}, 90000);

afterAll(async () => {
  await adapter.afterAll();
  await cleanup();
});