Now, running protractor configs by default only runs e2e tests. If the --benchmark flag is added, it runs only the perf tests, and always restarts the browser in between tests. If the --dryrun test is added, the perf tests are run only once. This should make it easier to run perf tests versus example e2e tests, and help stabilize the travis build because perf tests always run with a clean browser.
25 lines
590 B
Bash
Executable File
25 lines
590 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
echo =============================================================================
|
|
# go to project dir
|
|
SCRIPT_DIR=$(dirname $0)
|
|
cd $SCRIPT_DIR/../..
|
|
|
|
./node_modules/.bin/webdriver-manager update
|
|
|
|
function killServer () {
|
|
kill $serverPid
|
|
}
|
|
|
|
./node_modules/.bin/gulp serve.js.dart2js&
|
|
serverPid=$!
|
|
|
|
trap killServer EXIT
|
|
|
|
# wait for server to come up!
|
|
sleep 10
|
|
|
|
./node_modules/.bin/protractor protractor-dart2js.conf.js --browsers=${E2E_BROWSERS:-Dartium}
|
|
./node_modules/.bin/protractor protractor-dart2js.conf.js --benchmark --dryrun --browsers=${E2E_BROWSERS:-Dartium}
|