diff --git a/cucumber.sh b/cucumber.sh index 3807756..d318e4f 100644 --- a/cucumber.sh +++ b/cucumber.sh @@ -10,5 +10,19 @@ if [ "$SPEC" == "" ]; then else ./node_modules/.bin/wdio test/wdio.conf.js --spec "$SPEC" fi + +#Check and save the status of tests run +if [ $? -eq 0 ] +then + echo "Cucumber run success" + STATUS=0 +else + echo "Cucumber run had errors" + STATUS=1 +fi + #Kill server after run kill -9 ${server} + +#Exit with proper status +exit $STATUS