aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/test-website26
1 files changed, 17 insertions, 9 deletions
diff --git a/bin/test-website b/bin/test-website
index 18994cc5..b693bd60 100755
--- a/bin/test-website
+++ b/bin/test-website
@@ -4,7 +4,7 @@
USAGE = <<EOT
This is Mechanical-Rob - an automated web server tester for
Genenetwork.org that uses the brilliant
- mechanize gem.
+ mechanize gem with minitest.
To use this software you need to install mechanize. Run it from
the root of the genenetwork2 source tree as, for example,
@@ -15,6 +15,10 @@ If you are using the small deployment database you can use
./bin/test-website --skip -n
+To run individual tests on localhost you can do
+
+ ruby -Itest -Itest/lib test/lib/mapping.rb --name="/Mapping/"
+
For more information see http://genenetwork.org/
EOT
@@ -36,6 +40,10 @@ opts = OptionParser.new do |o|
end
end
+ o.on('--all', 'Run all tests') do
+ options[:all] = true
+ end
+
o.on('-l','--link-checker', 'Check for dead links') do
options[:link_checker] = true
end
@@ -84,16 +92,16 @@ require 'minitest/autorun'
libpath = File.dirname(File.dirname(__FILE__))
$: << File.join(libpath,'test/lib')
-if options[:link_checker]
- require 'link_checker'
-else
- require 'main_web_functionality'
+require 'main_web_functionality'
+
+if options[:all] or options[:mapping_test]
+ require 'mapping'
end
-if options[:navigation_test]
- require 'navigation'
+if options[:all] or options[:link_checker]
+ require 'link_checker'
end
-if options[:mapping_test]
- require 'mapping'
+if options[:all] or options[:navigation_test]
+ require 'navigation'
end