Slight modification to test runner script, updated README.

Ada Werefox 2 months ago
parent 901d37a7a8
commit 93003a6c7d

@ -26,13 +26,27 @@ It's in the preliminary stages right now, but if you want to try your hand at ru
That will start up a docker compose setup with a Selenium standalone server and a Python runner for the test script(s). I plan to add much more here in the future, like the ability to specify which test suites to run, what URL to test at, organizing output, etc.
For now, this will just run a test that opens the browser to []( and waits 10 seconds, then closes. Just a small smoke test.
You can also just bring up a selenium-standalone container with:
./ debug
./ --debug-server
./ -s
Once that is up, you can also debug tests with the node container with:
./ --debug-node
./ -n
The latter of which will simply run all the robot tests in the tests/test_suite directory.
## Production

@ -4,8 +4,11 @@ set -xe
if [ "$MODE" == "debug" ]; then
docker run --rm --name selenium-debug -p "4444:4444" -p "7900:7900" -e SE_OPTS="--allow-cors true" --shm-size="2g" selenium/standalone-chrome:108.0
if [ "$MODE" == "--debug-server" ] || [ "$MODE" == "-s" ]; then
docker run --rm --name selenium-debug-server -p "4444:4444" -p "7900:7900" -e SE_OPTS="--allow-cors true" --shm-size="2g" selenium/standalone-chrome:108.0
elif [ "$MODE" == "--debug-node" ] || [ "$MODE" == "-n" ]; then
docker run --rm --name selenium-debug-node -e "PYTHONPYCACHEPREFIX=/dev/null/" -v $(pwd)/tests/test_suite:/tests -v $(pwd)/tests/output:/output selenium-node:latest robot -d /output /tests/
cd tests/
docker compose build --no-cache --pull && docker compose up --remove-orphans --abort-on-container-exit --exit-code-from selenium-node