Commit f41288f5 authored by Kevin Stroeher's avatar Kevin Stroeher Committed by Curtis Adam

Fix UAC test.

- Use firefox instead of phantomjs or chrome, becuase:
	chrome blocks
	phantomjs has problems with chimp code injection into the browser

- install required software in this commit, probably istall it on the
  server and remove the installation from the script
parent 7854611e
......@@ -11,7 +11,7 @@ chimp:
- npm install
- meteor --allow-superuser --no-lint --no-release-check --settings settings_test.json &
- sleep 150
- ./tests/runTests.sh --browser=phantomjs
- ./tests/runTests.sh --browser=firefox
jshint:
stage: test
......
......@@ -21,7 +21,10 @@ Exit mongo shell
#### Load the test data
mongorestore -h 127.0.0.1 --port 3001 -d meteor tests/dump/meteor
#### Run the tests
chimp --ddp=http://localhost:3000 --watch --path=tests
chimp --ddp=http://localhost:3000 --path=tests/features/yourDirectory
you can add --browser=firefox to run the test on the firefox browser, default browser is chrome
the ci test run uses firefox, due to chrome and phantomjs are not working in the server,
chrome stucks and phantom has problems with script injection from chimp
#### Run all chimp tests
In project root start meteor `meteor --settings settings_test.json`.
......
......@@ -25,9 +25,13 @@ function checkDirectory
exitVal=0
successfulTests=0
failedTests=0
failedTestsArray=()
checkDirectory
apt-get update
apt-get --yes install firefox-esr xauth xvfb
# step through any subdirectory of tests/features and
# - restore meteor database
# - run chimp
......@@ -45,16 +49,17 @@ for testDir in $searchDir; do
# Restore the database
echo -e $GREEN"Restoring database ..." $NC
if ! mongorestore -h 127.0.0.1 --port 3001 -d meteor $dumpDir 1> /dev/null; then
if ! mongorestore --drop -h 127.0.0.1 --port 3001 -d meteor $dumpDir 1> /dev/null; then
echo -e $RED"mongorestore failed!" $NC
exit 2
fi
# Run chimp
echo -e $GREEN"Running chimp ..." $NC
chimp --ddp=http://localhost:3000 --path=$testDir $1
xvfb-run --server-args="-screen 0 1920x1080x16" chimp --ddp=http://localhost:3000 --path=$testDir $1
if [ $? -ne 0 ]; then
failedTests=$((failedTests+1))
failedTestsArray+=("$testDir")
echo -e $RED"Chimp test failed!" $NC
exitVal=1
else
......@@ -67,4 +72,8 @@ echo -e $BLUE"Testing result:" $NC
echo -e $GREEN"Successfull tests: $successfulTests" $NC
echo -e $RED"Failed tests: $failedTests" $NC
for test in $failedTestsArray; do
echo -e $RED $test $NC
done
exit $exitVal
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment