Created
March 23, 2010 03:38
-
-
Save meddulla/340817 to your computer and use it in GitHub Desktop.
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
#!/bin/sh | |
# Run all cucumber tests in app cucumber/features directory every n seconds | |
# Usage | |
# ./autotest.sh <loop time seconds> | |
# ./autotest.sh 15 | |
# assumes test is in cucumber/features | |
# and cucumber dir in same dir as this file | |
check() { | |
for="$1" | |
while true | |
do | |
echo `cucumber cucumber/features -f progress` | |
echo '\n' | |
sleep $for | |
done | |
} | |
check $* |
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
#!/bin/sh | |
# Run all cucumber tests in app cucumber/features directory every n seconds | |
# Plays sound on error using say and print green success on sucess | |
# Usage | |
# ./autotest.sh <loop time seconds> | |
# ./autotest.sh 60 | |
# assumes test is in cucumber/features | |
# and cucumber dir in same dir as this file | |
# interrupt with ctrl+c | |
check() { | |
for="$1" | |
while true | |
do | |
res=`cucumber cucumber/features -f progress` | |
if [[ $res == *failed* ]]; then | |
echo $res | |
say error | |
else | |
echo '\E[47;32m'"\033[1msuccess\033[0m" | |
fi | |
echo '\n' | |
sleep $for | |
done | |
} | |
check $* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment