fhoeben/hsac-fitnesse-fixtures

Why are the linux drivers explicitily excluded?

Closed this issue · 1 comments

I was trying to get some tests running in a docker container. maven:3.8-eclipse-temurin-11 seemed natural fit. But that is (of course) linux.

And then all got confusing. Actually because of some reasons:

  1. drivers missing -> errors
  2. honestly also installing the 'official' browsers in debian is a bit tricky
  3. even more so if the underlying architecture is a mac (amd64)

In the end I just gave up on 3 (that just happened to be the machine I was trying it on). 2 is fixable. But 1 wouldn't even have existed if the odd choice to omit them in this project wasn't made?

Just having the drivers is not enough to run browser tests, as you already found. The actual browsers must be installed also, to get this to work I used more complete/complex base images (Ubuntu based I believe).

Easiest fix is just to use the images already present in docker hub. They are available both in amd64 and arm64 versions:
https://hub.docker.com/r/hsac/fitnesse-fixtures-test-jre11-chrome or https://hub.docker.com/r/hsac/fitnesse-fixtures-test-jre11-chrome-with-pdf
The docker images are built using https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/main/docker/Dockerfile

I didn't need to add the driver as it is already contained in the base image, matching the browser installed there.

Compared to installing browsers (with font support etc, also in arm64 for mac) I believe adding the driver itself is not that hard. To get it to work on arm64, for which Google doesn't publish binaries, you have to switch to chromium. Also getting a recent Firefox that works on amd64 is not really easy. I recently spent some time helping updating the base images I use in this project...

If you want lighter image you can use https://hub.docker.com/r/hsac/fitnesse-fixtures-test-jre11, but then no browser support.