This is simple java-based docker project built to control chrome through java code.
The project is built using docker-selenium image with additional tools installed.
-
Install Docker from https://docs.docker.com/v17.09/engine/installation/
-
Install vncviewer from www.realvnc.com
-
Get Docker tarball from
docker.link
withcat docker.link | wget -i
-
Import tarball to Docker with
docker load < ~/chrome-node-original.tar
-
Run container with
docker run -d -e SCREEN_WIDTH=1366 -e SCREEN_HEIGHT=768 -p 5900:5900 -p 4444:4444 -v /dev/shm:/dev/shm -v ~/dockershare:/home/seluser/code chrome-node-original
-
Open shell in container (assuming this only one container running) with
ID=$(docker ps | awk '{printf $1}' | cut -c 10-);docker exec -it $ID /bin/bash;echo $ID;
-
Change folder to home with
cd ~/code/moneylion-example
-
Launch tests with
mvn -U clean test
-
Find the screenshots from each test run in
~/code/screenshots
-
Find reports in
code/moneylion-example/target/surefire-reports
folder -
Launch API test with
python3 /home/seluser/code/moneylion-example/apitest/unifiTestWrapper.py
-
Find reports in
python3 /home/seluser/code/moneylion-example/apitest/reports/report
folder