aboutsummaryrefslogtreecommitdiff
path: root/bin/test-website
diff options
context:
space:
mode:
authorzsloan2016-10-03 19:20:21 +0000
committerzsloan2016-10-03 19:20:21 +0000
commitdb0633155b88667e3c6ea760e0637ff1308d34e0 (patch)
tree9a2d3c677bee40b9d428092727ad0e5e9842d912 /bin/test-website
parent6a0a3626baad96deb1e8dc7d27fe1fa15e8c5b98 (diff)
parent2115fcfde74375252f556153d48f52f4d15fb298 (diff)
downloadgenenetwork2-db0633155b88667e3c6ea760e0637ff1308d34e0.tar.gz
Merge branch 'master' of github.com:genenetwork/genenetwork2
Diffstat (limited to 'bin/test-website')
-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