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

test: Detox: add video recording on failure #11987

Merged
merged 9 commits into from
Oct 24, 2024
9 changes: 7 additions & 2 deletions .detoxrc.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
/** @type {Detox.DetoxConfig} */
module.exports = {
artifacts: {
rootDir: "./artifacts/screenshots",
rootDir: "./artifacts",
plugins: {
screenshot: {
shouldTakeAutomaticSnapshots: true,
keepOnlyFailedTestsArtifacts: true,
takeWhen: {
testStart: false,
testDone: false,
}
},
},
video: {
enabled: true, // Enable video recording
keepOnlyFailedTestsArtifacts: true, // Keep only failed tests' videos
},
},
},

testRunner: {
args: {
$0: 'jest',
Expand Down
4 changes: 2 additions & 2 deletions bitrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@ workflows:
- content: |-
#!/usr/bin/env bash
set -ex
cp -r "$BITRISE_SOURCE_DIR/artifacts/screenshots" "$BITRISE_DEPLOY_DIR"
cp -r "$BITRISE_SOURCE_DIR/artifacts" "$BITRISE_DEPLOY_DIR"
- deploy-to-bitrise-io@2.3:
title: Deploy test screenshots
is_always_run: true
Expand Down Expand Up @@ -1004,7 +1004,7 @@ workflows:
- content: |-
#!/usr/bin/env bash
set -ex
cp -r "$BITRISE_SOURCE_DIR/artifacts/screenshots" "$BITRISE_DEPLOY_DIR"
cp -r "$BITRISE_SOURCE_DIR/artifacts" "$BITRISE_DEPLOY_DIR"
- deploy-to-bitrise-io@2.3:
is_always_run: true
run_if: .IsBuildFailed
Expand Down
Loading