Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Artifacts did not get created for a detox test #4636

Open
2 tasks done
kagrawal98 opened this issue Nov 20, 2024 · 2 comments
Open
2 tasks done

Artifacts did not get created for a detox test #4636

kagrawal98 opened this issue Nov 20, 2024 · 2 comments

Comments

@kagrawal98
Copy link
Contributor

kagrawal98 commented Nov 20, 2024

What happened?

I ran detox tests for IOS and the artifacts folder did not have a folder created for the test that failed. The test failed with the below error -
Test Failed: Timed out while waiting for expectation: TOBEVISIBLE WITH MATCHER(id == “some_id”) TIMEOUT(10s)

What was the expected behaviour?

The expectation in case of test failure is to see the video recording and the logs for the failed test.

Was it tested on latest Detox?

  • I have tested this issue on the latest Detox release and it still reproduces.

Did your test throw out a timeout?

Help us reproduce this issue!

Not able to reproduce the issue as in the next failures the folder is getting created

In what environment did this happen?

Detox version: 20.25.6
React Native version: 0.73.9
Has Fabric (React Native's new rendering system) enabled: no
Node version: 18.13.0
Device model: iPhone 14
iOS version: 18
macOS version:
Xcode version: 15.4
Test-runner (select one): jest

Detox logs

Detox logs
paste logs here!

Device logs

Device logs
paste your device.log here!

More data, please!

Not able to see the device logs as the artifacts did not have folder created for the test.

@ersefuril
Copy link

Can you post your .detoxrc.js ?

@kagrawal98
Copy link
Contributor Author

{
  "testRunner": {
    "args": {
      "$0": "jest",
      "config": "visual-regression-tests/config.js",
      "_": ["."]
    },
    "jest": {
      "setupTimeout": 300000,
      "reportSpecs": false,
      "reportWorkerAssign": false
    }
  },
  "devices": {
    "emulator": {
      "type": "android.emulator",
      "device": {
        "avdName": "Pixel_API_30"
      }
    },
    "emulator.debug": {
      "type": "android.emulator",
      "device": {
        "avdName": "Sample_PIXEL"
      }
    },
    "simulator": {
      "type": "ios.simulator",
      "device": {
        "type": "iPhone 14"
      }
    },
    "simulator.debug": {
      "type": "ios.simulator",
      "device": {
        "name": "Sample iPhone 14"
      }
    }
  },
  "apps": {
    "android.debug": {
      "type": "android.apk",
      "binaryPath": "android/app/build/outputs/apk/debug/app-debug.apk",
      "build": "cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug && cd .."
    },
    "android.release": {
      "type": "android.apk",
      "binaryPath": "android/app/build/outputs/apk/release/app-release.apk",
      "build": "cd android && ./gradlew assembleRelease assembleAndroidTest -PreactNativeArchitectures=x86_64 -DtestBuildType=release -Dorg.gradle.jvmargs='-Xmx18g -Xms12g' && cd .."
    },
    "ios.debug": {
      "name": "sampleApp",
      "type": "ios.app",
      "binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/sampleApp.app",
      "build": "xcodebuild -workspace ios/sampleApp.xcworkspace -scheme rippling -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build"
    },
    "ios.release": {
      "name": "sampleApp",
      "type": "ios.app",
      "binaryPath": "ios/build/Build/Products/Release-iphonesimulator/sampleApp.app",
      "build": "xcodebuild -workspace ios/sampleApp.xcworkspace -scheme rippling -configuration Release -sdk iphonesimulator -derivedDataPath ios/build"
    }
  },
  "configurations": {
    "android.emu.debug": {
      "device": "emulator.debug",
      "app": "android.debug"
    },
    "android.emu.release": {
      "device": "emulator",
      "app": "android.release"
    },
    "ios.sim.debug": {
      "device": "simulator.debug",
      "app": "ios.debug"
    },
    "ios.sim.release": {
      "device": "simulator",
      "app": "ios.release"
    }
  },
  "artifacts": {
    "rootDir": "screenshot-test-artifacts/",
    "plugins": {
      "log": { "enabled": false },
      "instruments": { "enabled": false },
      "uiHierarchy": "enabled",
      "screenshot": {
        "enabled": true,
        "shouldTakeAutomaticSnapshots": false,
        "keepOnlyFailedTestsArtifacts": false,
        "takeWhen": {
          "testStart": false,
          "testDone": false,
          "appNotReady": false
        }
      }
    }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants