From 14eacc84611e57324493e43ac7523535722ebb38 Mon Sep 17 00:00:00 2001 From: lrbalt Date: Tue, 13 Mar 2012 11:58:43 -0700 Subject: [PATCH] Updated Testing (textile) --- Testing.textile | 53 +++++++++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/Testing.textile b/Testing.textile index 468e275..9c63143 100644 --- a/Testing.textile +++ b/Testing.textile @@ -23,7 +23,7 @@ Assuming you've already checked out the source code using git, change to the roo
 
-rake test
+bundle exec rake test
 
 
@@ -35,45 +35,35 @@ To run the Rspec tests run
 
-rake spec
+bundle exec rake spec
 
 
h2. Running the cucumber test suite -For integration testing Tracks uses cucumber. For those features that require javscript/ajax, Tracks uses Selenium on Webrat +For integration testing Tracks uses cucumber. For those features that require javscript/ajax, Tracks uses Selenium and Capybara -To run the features excluding the selenium features and the work-in-progress (wip) features, run +To run all the features excluding the work-in-progress (wip) features, run
 
-rake cucumber
+bundle exec rake cucumber
 
 
-To run the features that make use of Selenium on Webrat, run - -
-
-rake cucumber:selenium
-
-
+This will execute all features, including those using Selenium. To run the features that are work in progress run these:
 
-rake cucumber:selenium_wip
-
-rake cucumber:wip
+bundle exec rake cucumber:wip
 
 
-To run a feature by hand run these. Please note the different RAILS_ENV value and the -p usage for selenium: +To run a feature by hand run these.
 
-RAILS_ENV=cucumber cucumber features/my_feature.feature
-
-RAILS_ENV=selenium cucumber -p selenium features/my_feature.feature
+bundle exec cucumber features/my_feature.feature
 
 
@@ -83,13 +73,28 @@ h2. Running the tests headless All tests will run on a headless setup except for the selenium tests. They will need a webbrowser which will need a running X-server. -You can solve this by running a virtual framebuffer X server. In Fedora, you need to install the packages xorg-x11-server-Xvfb and xorg-x11-apps +You can solve this by running a virtual framebuffer X server or by using the capybara-webkit driver. + +h3. Using webkit + +Uncomment the capybara-webkit gem in the Gemfile and run bundle install. This will need the Qt development libraries on your system. + +Run the features using webkit: + +
+
+bundle exec rake cucumber JS_DRIVER=webkit
+
+
+ +h3. Framebuffer +For the framebuffer in Fedora, you need to install the packages xorg-x11-server-Xvfb and xorg-x11-apps
 
 Xvfb :99 -ac -screen 0 1024x768x16 &
 
-DISPLAY=:99.0 rake cucumber:selenium
+DISPLAY=:99.0 bundle exec rake cucumber:selenium
 
 killall Xvfb
 
@@ -103,7 +108,7 @@ To run the suite simply run Tracks in the test environment:
 
 
 
-  script/server -e test
+  bundle exec script/server -e test
 
 
@@ -111,7 +116,7 @@ in a separate command window, then run
 
-  rake test:acceptance
+  bundle exec rake test:acceptance
 
 
@@ -123,7 +128,7 @@ h2. Problems with cucumber selenium tests h3. Tests doesn't start -Firefox 3.x is required to run the selenium tests properly. It's also recommanded to use an english version, to avoid problems due to the locale. +Firefox 3.x is required to run the selenium tests properly. It's also recommended to use an english version, to avoid problems due to the locale. You can get an old version of firefox "here":http://www.mozilla.org/en-US/firefox/all-older.html. h3. Sqlite3 Lock exceptions