Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/react-native/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Reactjs 排毒e2e测试分配给未定义和跳过的所有测试_Reactjs_React Native_Jestjs_Detox - Fatal编程技术网

Reactjs 排毒e2e测试分配给未定义和跳过的所有测试

Reactjs 排毒e2e测试分配给未定义和跳过的所有测试,reactjs,react-native,jestjs,detox,Reactjs,React Native,Jestjs,Detox,在我们的react native项目中,我们使用解毒药进行e2e测试。这些都工作得很好,直到我们突然体验到测试套件被分配到未定义的。奇怪的是,这个问题在恢复到以前排毒有效的状态时仍然存在。iOS和Android配置都存在问题 (这个问题类似于问题,但是,到目前为止,解毒应该与我们的react原生版本一起工作。) Myrc.json: { "testRunner": "jest", "runnerConfig": "e

在我们的react native项目中,我们使用解毒药进行e2e测试。这些都工作得很好,直到我们突然体验到测试套件被分配到未定义的。奇怪的是,这个问题在恢复到以前排毒有效的状态时仍然存在。iOS和Android配置都存在问题

(这个问题类似于问题,但是,到目前为止,解毒应该与我们的react原生版本一起工作。)

My
rc.json

{
  "testRunner": "jest",
  "runnerConfig": "e2e/config.json",
  "configurations": {
    "ios": {
      "type": "ios.simulator",
      "binaryPath": "ios/build/Build/Products/Test-iphonesimulator/Cliniserve One.app",
      "build": "xcodebuild -workspace ios/shiftapp.xcworkspace -scheme shiftapp.test -configuration Test -sdk iphonesimulator -derivedDataPath ios/build",
      "device": {
        "type": "iPhone 11"
      }
    },
    "android": {
      "type": "android.emulator",
      "binaryPath": "android/app/build/outputs/apk/development/debug/shiftapp_development_debug.apk",
      "build": "cd android && ./gradlew assembleDevelopmentDebug assembleDevelopmentDebugAndroidTest -DtestBuildType=debug && cd ..",
      "device": {
        "avdName": "Pixel_API_29_AOSP"
      }
    }
  }
}
My
e2e/config.json

{
    "setupFilesAfterEnv" : ["./init.js"],
    "testEnvironment": "./environment",
    "testRunner": "jest-circus/runner",
    "testTimeout": 120000,
    "testRegex": "\\.e2e\\.js$",
    "reporters": ["detox/runners/jest/streamlineReporter"],
    "verbose": true
}
e2e/environment.js

const {
  DetoxCircusEnvironment,
  SpecReporter,
  WorkerAssignReporter,
} = require('detox/runners/jest-circus');

class CustomDetoxEnvironment extends DetoxCircusEnvironment {
  constructor(config) {
    super(config);

    // Can be safely removed, if you are content with the default value (=300000ms)
    this.initTimeout = 300000;

    // This takes care of generating status logs on a per-spec basis. By default, Jest only reports at file-level.
    // This is strictly optional.
    this.registerListeners({
      SpecReporter,
      WorkerAssignReporter,
    });
  }
}

module.exports = CustomDetoxEnvironment;

如果您有任何关于如何使其重新工作的帮助或想法,我们将不胜感激。

关于
$adb devices
$xcrun simctl list
的输出是什么?您看到配置中列出的设备了吗?
$adb devices
$xcrun simctl list
的输出是什么?您看到配置中列出的设备了吗?