jeudi 20 août 2020

How to run electron inside an alpine docker image with Testcafe?

I'm trying to run my e2e Tests for an electron app with Testcafe on gitlab inside a docker image.

Therefor i use a docker image from Testcafe which i only extend by installing yarn.

The gitlab script just builds my e2e Tests (which succeeds), but electron does not come up and the pipeline stops with this error:

$ /opt/testcafe/docker/testcafe-docker.sh electron:./ci ./test/e2e/ --screenshots takeOnFails=true
Using locally installed version of TestCafe.
Error: spawn /builds/myFancyProject/node_modules/electron/dist/electron ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
    at onErrorNT (internal/child_process.js:469:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)

Any suggestion to solve this error?

This is my simple docker file:

FROM testcafe/testcafe

USER root

RUN apk add --update yarn

Aucun commentaire:

Enregistrer un commentaire