/poc-testcafe-dockerized-chrome-and-firefox

Simple proof of concept of dockerized e2e testing

Primary LanguageDockerfileMIT LicenseMIT

poc-testcafe-dockerized-chrome-and-firefox

This is a simple Proof of Concept about using Testcafe dockerized with docker-compose and dockerized apps.

Prerequisites

Have this installed:

  • Docker
  • Docker compose
  • yarn
  • NodeJS 12 LTS

 

Running dockerized Tests

git clone https://github.com/comsysto/poc-testcafe-dockerized-chrome-and-firefox.git
cd poc-testcafe-dockerized-chrome-and-firefox
yarn

yarn test:firefox
# XOR
yarn test:chrome

In the docker-compose-e2e.yml happens all the magic. It starts the app dockerized and a separate container for the e2e tests running the browsers and testcafe.

 

Error with Firefox

Only on Ubuntu 18.04 I get errors with firefox -headless. It works on macOS. And it works without headless!

  • ✅ Does not work on Ubuntu Server 18.04 with docker ce 18.09.7
    • NOTE: does not work when using firefox -headless you have to use Xvfb without headless mode!
  • ✅ Does not work on Ubuntu Server 18.04 with docker ce 19.03.5
    • NOTE: does not work when using firefox -headless you have to use Xvfb without headless mode!
  • ✅ Does work on macOS Catalina with docker desktop ce 19.03.5