Slight modification to test runner script, updated README.
This commit is contained in:
parent
901d37a7a8
commit
93003a6c7d
20
README.md
20
README.md
@ -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 [werefox.cafe](https://werefox.cafe) and waits 10 seconds, then closes. Just a small smoke test.
|
||||
|
||||
You can also just bring up a selenium-standalone container with:
|
||||
|
||||
```
|
||||
./run_tests.sh debug
|
||||
./run_tests.sh --debug-server
|
||||
```
|
||||
or
|
||||
```
|
||||
./run_tests.sh -s
|
||||
```
|
||||
|
||||
Once that is up, you can also debug tests with the node container with:
|
||||
|
||||
```
|
||||
./run_tests.sh --debug-node
|
||||
```
|
||||
or
|
||||
```
|
||||
./run_tests.sh -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
|
||||
|
||||
MODE=$1
|
||||
|
||||
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/
|
||||
|
||||
else
|
||||
cd tests/
|
||||
docker compose build --no-cache --pull && docker compose up --remove-orphans --abort-on-container-exit --exit-code-from selenium-node
|
||||
|
Loading…
Reference in New Issue
Block a user