aboutsummaryrefslogtreecommitdiff
path: root/bin/test-website
blob: 8efa37b1c16e65e4193f2b825f04177ee3f5c0f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env ruby


USAGE = <<EOT
This is Mechanical-Rob - an automated web server tester for 
                         Genenetwork.org that uses the brilliant 
                         mechanize gem.

To use this software you need to install mechanize. Run it from
the root of the genenetwork2 source tree as, for example,

  ./bin/test-website http://localhost:5003/ (default)

For more information see http://genenetwork.org/
                        
EOT

libpath = File.dirname(File.dirname(__FILE__))
$: << File.join(libpath,'test/lib')
  
$stderr.print USAGE

$host = 
  if ARGV.size>0
    ARGV.shift
  else
    "http://localhost:5003"
  end

$stderr.print "Testing <",$host,">\n"

require 'mechanize'
require 'minitest/spec'
require 'minitest/autorun'

# These are the actual testing modules

require 'main_web_functionality'