I am trying to run Selenium tests in the docker container. However, when I try to run the test, I get the following message:
ui-test | stderr: ChromeDriver was started successfully.
ui-test |
ui-test | stdout:
ui-test | ===============================================
ui-test | uiTestsSuite
ui-test | Total tests run: 4, Failures: 0, Skips: 4
ui-test | Configuration Failures: 1, Skips: 7
ui-test | ===============================================
ui-test |
ui-test |
ui-test | child process exited with code 0
Here's my Dockerfile
FROM centos:7
RUN yum -y install java-1.8.0-openjdk-devel
RUN yum -y install vim
RUN yum -y install wget
RUN mkdir -p /app
WORKDIR /app
RUN wget https://nodejs.org/dist/v14.9.0/node-v14.9.0-linux-x64.tar.gz
RUN tar --strip-components 1 -xzvf node-v* -C /usr/local
# Install dependencies.
RUN yum update
RUN yum install -y unzip openjdk-8-jre-headless xorg-x11-server-Xvfb libXi-devel GConf2-devel google-chrome
# Install ChromeDriver.
RUN wget -N https://chromedriver.storage.googleapis.com/2.35/chromedriver_linux64.zip -P ~/
RUN unzip ~/chromedriver_linux64.zip -d ~/
RUN rm ~/chromedriver_linux64.zip
RUN mv -f ~/chromedriver /usr/local/bin/chromedriver
RUN chown root:root /usr/local/bin/chromedriver
RUN chmod 0755 /usr/local/bin/chromedriver
# Install Selenium.
RUN wget -N http://selenium-release.storage.googleapis.com/2.40/selenium-server-standalone-2.40.0.jar -P ~/
RUN mv -f ~/selenium-server-standalone-2.40.0.jar /usr/local/bin/selenium-server-standalone.jar
RUN chown root:root /usr/local/bin/selenium-server-standalone.jar
RUN chmod 0755 /usr/local/bin/selenium-server-standalone.jar
EXPOSE 3000
ADD src/ src/
ADD rest/ rest/
ADD target/ui-tests.jar ui-tests.jar
RUN cd rest && npm install
RUN npm install express --save
ENTRYPOINT node rest/index.js
And docker-compose:
version: '3.7'
services:
ui-test:
build: ./
container_name: ui-test
ports:
- "3000:3000"
Does anyone know why my tests are skipped when I try to run them in docker? When I run those tests without docker, they work fine.