Add TEST_SUITE variable to docker run command. Now user can set the suite that should be run. (#14507)
parent
7c94e4fc58
commit
2431795f0c
|
|
@ -26,13 +26,18 @@ You can run the tests inside this docker image. You have to set URL of running C
|
|||
docker run --shm-size=256m -e TS_SELENIUM_BASE_URL=$URL eclipse/che-e2e:nightly
|
||||
```
|
||||
|
||||
If you want to gather screenshots of fallen tests, you have to mount a volume to the docker file. Create a folder, when you want to have the screenshots saved. Then run
|
||||
a command:
|
||||
If you want to gather screenshots of fallen tests, you have to mount a volume to the docker file. Create a folder, when you want to have the screenshots saved. Then run a command:
|
||||
|
||||
```
|
||||
docker run --shm-size=256m -v /full/path/to/your/folder:/root/e2e/report:Z -e TS_SELENIUM_BASE_URL=$URL eclipse/che-e2e:nightly
|
||||
```
|
||||
|
||||
Happy Path test suite will be run by default when executing a docker run command. If you want to run another test suite, you can specify that via variable ` TEST_SUITE `. Available tests are e.g. ` test-happy-path `, ` test-che-install ` and ` test-wkspc-creation-and-ls `.
|
||||
|
||||
```
|
||||
docker run --shm-size=256m -e TEST_SUITE=test-happy-path -e TS_SELENIUM_BASE_URL=$URL eclipse/che-e2e:nightly
|
||||
```
|
||||
|
||||
### Debugging
|
||||
#### Running own code
|
||||
If you have done some changes locally and you want to test them, you can mount your code directly to the Docker. If you do so, your mounted code will be executed instead of the code that is already in an image.
|
||||
|
|
|
|||
|
|
@ -7,6 +7,11 @@ if [ -z "$TS_SELENIUM_BASE_URL" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# Set testing suite
|
||||
if [ -z "$TEST_SUITE" ]; then
|
||||
TEST_SUITE=test-happy-path
|
||||
fi
|
||||
|
||||
# Launch selenium server
|
||||
/usr/bin/supervisord --configuration /etc/supervisord.conf & \
|
||||
export TS_SELENIUM_REMOTE_DRIVER_URL=http://localhost:4444/wd/hub
|
||||
|
|
@ -42,5 +47,6 @@ else
|
|||
cd /tmp/e2e || exit
|
||||
fi
|
||||
|
||||
|
||||
# Launch tests
|
||||
npm run test-happy-path
|
||||
npm run $TEST_SUITE
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
--timeout 2200000
|
||||
--reporter 'dist/driver/CheReporter.js'
|
||||
-u tdd
|
||||
--bail
|
||||
--full-trace
|
||||
--spec dist/tests/e2e/WorkspaceCreationAndLsInitialization.spec.js
|
||||
--require source-map-support/register
|
||||
|
|
@ -10,6 +10,7 @@
|
|||
"test": "./generateIndex.sh && npm run lint && npm run tsc && mocha --opts mocha.opts",
|
||||
"test-happy-path": "./generateIndex.sh && npm run lint && npm run tsc && mocha --opts mocha-happy-path.opts",
|
||||
"test-che-install": "./generateIndex.sh && npm run lint && npm run tsc && mocha --opts mocha-che-operatorhub.opts",
|
||||
"test-wkspc-creation-and-ls": "./generateIndex.sh && npm run lint && npm run tsc && mocha --opts mocha-wkspc-creation-and-ls.opts",
|
||||
"lint": "tslint --fix -p .",
|
||||
"tsc": "tsc -p ."
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue