Running detox e2e tests with video recording takes all available build time.


#1

Hey. I am using React native with detox for e2e testing on iOS. I wanted to record a video cast during tests. When I use this feature localy, it works fine and increase build time a bit. When I use this feature on bitrise then build takes more than 90 minutes.
detox test --configuration ios.sim.release --record-videos all --cleanup

Without this feature build takes about 30 minute on bitrise.

detox test --configuration ios.sim.release --cleanup

Here’s my bitrise.yaml section:

_detox_tests:
    before_run: []
    after_run: []
    steps:
    - npm:
        inputs:
        - command: install -g detox-cli
        title: Install Detox CLI
    - npm:
        inputs:
        - command: install -g react-native-cli
        title: Install React Native CLI
    - script:
        inputs:
        - content: "#!/bin/bash\nls \nbrew tap wix/brew\nbrew install applesimutils"
        title: Install Detox Utils
    - script:
        inputs:
        - is_debug: yes$BITRIS$BITRISE_BUILD_STATUSE_SOURCE_DIR
        - content: |-
            #!/bin/bash

            detox build --configuration ios.sim.release
        title: Detox - Build Release App (iOS)
    - script:
        inputs:
        - content: |-
            #!/bin/bash

            detox test --configuration ios.sim.release --record-videos all --cleanup
        title: Detox - Run E2E Tests

Could you clarify why this is happening?


#2

Hi!

It seems, it is not possible to run a video recording without hardware acceleration.


You need to know that this machines (where the virtual machine runs) don’t have physical GPU, only a simulated one by the CPU. This is why you can’t enable the hardware acceleration.


#3

Thanks for response. Is there a way to how I can run detox e2e tests on the real device with video recording on bitrise?


#4

Hy @ns_bvs,

you will only be able to run the tests on emulators :thinking:
as far as I know you should be able to record videos, for screenshots can be taken as well.