Permalink
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
wlodarsb/cucumberTest.sh
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I have added a --fail-fast argument to Cucumber so that the test stops as soon as it comes across an error.
27 lines (19 sloc)
598 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# force the script to exit on first fail | |
set -e | |
# create any directories needed by the test script | |
mkdir -p screenshots | |
# delete any local files | |
rm -rf *.db | |
rm -rf public/music/* | |
rm -rf public/art/* | |
# install packages if none found | |
# [ ! -d "node_modules" ] && echo "INSTALLING MODULES" && npm install | |
# start the web server in background mode | |
node index.js& | |
# run the test suite in background mode | |
node_modules/.bin/cucumber-js --order defined --fail-fast ./features -r ./steps & | |
# wait for the tests to complete | |
sleep 40 | |
# kill the web server | |
taskkill -f -im node.exe |