diff options
| author | Pjotr Prins | 2016-10-07 10:34:32 +0000 |
|---|---|---|
| committer | Pjotr Prins | 2016-10-07 10:34:32 +0000 |
| commit | 420fd69ceda63871e9f6755112769c5615ed45f6 (patch) | |
| tree | d834a125aaf99dcd04868a8907b097445f576b4b /bin/test-website | |
| parent | 0f602fd058934feaaa37eb72d055bfcfcfc9ef8f (diff) | |
| parent | 28da8f4304f406b4eff5ad68757735a0cb524e94 (diff) | |
| download | genenetwork2-420fd69ceda63871e9f6755112769c5615ed45f6.tar.gz | |
Merge branch 'master' into chfi
Diffstat (limited to 'bin/test-website')
| -rwxr-xr-x | bin/test-website | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/bin/test-website b/bin/test-website index 18994cc5..c9a72a5e 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,14 @@ If you are using the small deployment database you can use ./bin/test-website --skip -n +To run all tests + + ./bin/test-website --all + +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 +44,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 +96,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 |
