From d8139f7eaa44f82cbed89cd3f501d588362bf954 Mon Sep 17 00:00:00 2001 From: Alessandro Palmeira + João M. M. da Silva Date: Wed, 24 Oct 2012 17:58:36 -0200 Subject: [PATCH] [Mezuro] draft to cucumber hooks in acceptance tests --- features/support/hooks.rb | 6 ++++++ plugins/mezuro/features/run_acceptance_tests.sh | 20 ++++++++++++-------- 2 files changed, 18 insertions(+), 8 deletions(-) create mode 100644 features/support/hooks.rb diff --git a/features/support/hooks.rb b/features/support/hooks.rb new file mode 100644 index 0000000..bd9e0b8 --- /dev/null +++ b/features/support/hooks.rb @@ -0,0 +1,6 @@ +Before do |scenario| + # The +scenario+ argument is optional, but if you use it, you can get the title, + # description, or name (title + description) of the scenario that is about to be + # executed. + STDOUT.puts "Starting scenario: #{scenario.name}" +end diff --git a/plugins/mezuro/features/run_acceptance_tests.sh b/plugins/mezuro/features/run_acceptance_tests.sh index 6147ed3..51c2a0c 100755 --- a/plugins/mezuro/features/run_acceptance_tests.sh +++ b/plugins/mezuro/features/run_acceptance_tests.sh @@ -3,15 +3,15 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" MEZURO_HOME="$DIR/.." - -echo $MEZURO_HOME - # Ignore errors from all commands trap "" ERR # Change Kalibro Service -echo "http://localhost:8080/KalibroTest/" > "$MEZURO_HOME/service.yml" -echo "Changed Kalibro Service" +#echo "http://localhost:8080/KalibroTest/" > "$MEZURO_HOME/service.yml" +#echo "Changed Kalibro Service" + +#echo cleaning Kalibro database ... +#mysql -h lua -u kalibro -pkalibro2012p4ss -D 'kalibro' < $MEZURO_HOME/features/clean_kalibro_db.sql # Run acceptance test if [ "$1" == "" ]; then @@ -21,10 +21,14 @@ else fi #cat "$MEZURO_HOME/service.yml" -mysql -h lua -u kalibro -pkalibro2012p4ss -D 'kalibro_test' < $MEZURO_HOME/features/clean_kalibro_db.sql +#echo cleaning Kalibro database ... + +#mysql -h lua -u kalibro -pkalibro2012p4ss -D 'kalibro' < $MEZURO_HOME/features/clean_kalibro_db.sql + +#echo Kalibro database cleaned! # Change back Kalibro Service -echo "http://localhost:8080/KalibroService/" > "$MEZURO_HOME/service.yml" -echo "Changed back Kalibro Service" +#echo "http://localhost:8080/KalibroService/" > "$MEZURO_HOME/service.yml" +#echo "Changed back Kalibro Service" #cat "$MEZURO_HOME/service.yml" -- libgit2 0.21.2