Testcafe: Enable video recording in docker image

Created on 16 Mar 2019  路  9Comments  路  Source: DevExpress/testcafe

Right now it is not possible to use the new video recording feature #2151 with the testcafe docker image.
Running the docker image with the _--video_ parameter causes an error:

ERROR Unable to locate the FFmpeg executable required to record videos. Do one of the following:

* add the FFmpeg installation directory to the PATH environment variable,
* specify the path to the FFmpeg executable in the FFMPEG_PATH environment variable or the ffmpegPath video option,
* install the @ffmpeg-installer/ffmpeg package from npm.

Type "testcafe -h" for help.

What is your Test Scenario?

When running tests on a CI/CD system using the testcafe docker image, videos are helpful to investigate failing tests.

What are you suggesting?

As far as I've seen, the only thing missing to make this work is adding the _ffmpeg_ package to the docker image. I've tested this solution and was able to record videos, as soon as the _ffmpeg_ package was installed during image creation.

### What alternatives have you considered?

### Additional context

Auto-locked Need improvement

All 9 comments

https://hub.docker.com/r/afifsohaili/testcafe-ffmpeg I extended the original image, adding ffmpeg. We can use this until testcafe builds the new docker image.

I apologize for the delay, we are waiting for our lawyer to approve including ffmpeg to our image, looks like the licensing rules are unclear about it.

Hey! Did you try using this in your package.json??
"@ffmpeg-installer/ffmpeg": "^1.0.20",
Try to add that to your dependencies in package.json and do an npm i before running the tests..

@AndreyBelym any update on this?

@tbinna
Currently, we cannot provide any estimates regarding this issue.

Hey! Did you try using this in your package.json??
"@ffmpeg-installer/ffmpeg": "^1.0.20",
Try to add that to your dependencies in package.json and do an npm i before running the tests..

did this workaround work?

@prudhvidandamudi
I suppose this workaround will not work because the package.json file is located in the project, not in the docker container.

Unfortunately, I have to close this issue. License restrictions do not allow us to install the @ffmpeg package in the official TestCafe image.

Please use the first workaround suggested above: build your own docker image based on the official image as @afifsohaili mentioned.

This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests. We recommend you ask TestCafe API, usage and configuration inquiries on StackOverflow.

This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests. We recommend you ask TestCafe API, usage and configuration inquiries on StackOverflow.

Was this page helpful?
0 / 5 - 0 ratings