@@ -15,9 +15,6 @@ docker tag selenium:latest elgalu/selenium:latest
1515
1616# Ensure clean env
1717docker rm -vf grid || true
18- docker rm -vf grid2 || true
19- docker rm -vf grid3 || true
20- docker rm -vf gridrc || true
2118# Some dummy log files
2219rm -rf ** /* " conflicted copy" * .log
2320
@@ -82,79 +79,6 @@ if ! docker exec -t grid run_test; then
8279fi
8380
8481docker exec grid errors || true
85-
86- echo " #==================================================================="
87- echo " # Scenario 1c [basic]: Test Selenium 3"
88- echo " #==================================================================="
89-
90- docker run --name=grid3 -d -e VIDEO=true \
91- -e MOCK_SERVER_HOST=" d.host.loc.dev" \
92- -e MOCK_SERVER_PORT \
93- -e USE_SELENIUM=" 3" \
94- -e CI \
95- -e VIDEO_CONVERSION_MAX_WAIT=" 40s" \
96- --shm-size=1g \
97- selenium
98-
99- sleep ${ADDED_TEST_SLEEP} && docker logs grid3
100- docker exec grid3 wait_all_done 70s
101- docker exec grid3 versions
102- docker exec grid3 errors || true
103- docker logs grid3
104- docker exec -t grid3 run_test
105- docker exec grid3 errors || true
106- docker cp grid3:/test/console.png ./images/grid3_console.png
107-
108- # Separate capabilities2.json from capabilities3.json
82+ docker cp grid:/test/console.png ./images/grid3_console.png
10983docker cp grid:/capabilities.json .
110- docker cp grid:/capabilities2.json .
111- docker cp grid3:/capabilities3.json .
112-
113- # cleanup (not yet because we need to extract the capabilities)
114- # docker stop grid3 || true
115- # docker rm grid3 || true
116-
117- echo " #==================================================================="
118- echo " # Scenario 1d [basic]: Selenium IDE RC and mount videos"
119- echo " #==================================================================="
120-
121- rm -rf ./videos/mounted
122- mkdir -p ./videos/mounted
123- docker run --name=gridrc -d -e VIDEO=true \
124- -e MOCK_SERVER_HOST=" d.host.loc.dev" \
125- -e MOCK_SERVER_PORT \
126- -e CI \
127- -e VIDEO_CONVERSION_MAX_WAIT=" 40s" \
128- -e USE_SELENIUM=" 2" \
129- -e CHROME=true -e FIREFOX=true \
130- -e RC_CHROME=true -e RC_FIREFOX=true \
131- -e VIDEO_FILE_NAME=sele_ide \
132- -e HOST_GID=$( id -g) -e HOST_UID=$( id -u) \
133- --shm-size=1g \
134- -p 4444:24444 \
135- -v ${PWD} /videos/mounted:/home/seluser/videos \
136- selenium
137-
138- sleep ${ADDED_TEST_SLEEP} && docker logs gridrc
139- docker exec gridrc wait_all_done 70s
140- docker exec gridrc versions
141- docker exec gridrc errors || true
142- docker logs gridrc
143-
144- # Run tests
145- cd test/seleIDE
146- gem install bundler -v=1.13.2
147- bundle install
148- RUBYOPT=W0 bundle exec ./seleIDE * .rb
149-
150- docker exec gridrc stop-video
151- docker exec gridrc errors || true
152- cd ../..
153- mkdir -p ./videos/rc
154- docker cp gridrc:/videos/sele_ide.mp4 ./videos/rc/
155- ls -la ./videos/rc/sele_ide.mp4
156- ls -la ./videos/mounted/sele_ide.mp4
157-
158- # cleanup
159- docker stop gridrc || true
160- docker rm gridrc || true
84+ docker cp grid:/capabilities3.json .
0 commit comments