r2 - 03 Oct 2007 - 09:21:42 - IvanPeikovYou are here: Wiki >  AppLogic2 Web > CatWebserversWebTP
ALERT! AppLogic 2.1/2.2 Documentation The latest production release is AppLogic 2.8.9

WEB: Simple Web Server - Test Plan

This is the test plan for the "WEB-family" of appliances.

Preparation

For test cases below we need a web-test application like this:

test_app_web.png

Follows a per-appliance description of the modified properties/volumes (default value assumed for properties/volumes not mentioned below):

in1 - appliance of type INSSL

  • ip_addr   = 209.85.116.84 (use any available IP here)
  • gateway   = 209.85.116.1 (use appropriate gateway)
  • netmask   = 255.255.255.128 (use appropriate netmask)
  • l7_accept = http
in2 - appliance of type IN
  • ip_addr   = 209.85.116.83 (use another available IP here)
  • gateway   = 209.85.116.1 (use appropriate gateway)
  • netmask   = 255.255.255.128 (use appropriate netmask)
www1 - appliance of type WEB
  • data_timeout_sec       = 600
  • idle_timeout_sec       = 60
  • admin_email            = admin@www1.NOSPAM.host.name
  • server_signature       = on
  • error_log_level        = debug
  • content_on_fs          = on
  • max_connections        = 200
  • error_log_filename     = test-error.log
  • persistent_connections = off
  • index_files            = index.php
  • use_htaccess           = on
  • shared_perl_ext        = .spm
  • info_level             = full
  • logs_enabled           = on
  • default_charset        = cp1251
  • host_name              = www1.host.name
  • access_log_filename    = test-access.log
  • cgi_ext                = .pl
www2 - appliance of type WEB
  • content  = web_data (assign a 10M application volume web-test:web_data)
data - appliance of type NAS
  • data     = log_data (assign a 10M application volume web-test:log_data)
mon - appliance of type MON
  • data     = mon_data (assign a 10M application volume web-test:mon_data)
net - appliance of type NET
  • ip_addr  = 209.85.116.85 (use any available IP here)
  • gateway  = 209.85.116.1 (use appropriate gateway)
  • dns1     = 207.218.192.38 (use any available IP here)
  • netmask  = 255.255.255.128 (use appropriate netmask)
  • dns2     = 66.98.240.131 (use any available IP here)
db - appliance of type MYSQL
  • data     = sql_data (assign a 100M application volume web-test:sql_data)

The log_data and web_data volumes should create a single file - index.php which should only contain the following line: <? phpinfo(); ?>

Boundary Tests

Verify that the WEB boundary matches the appliance datasheet:

  1. Check the appliance description and version.
  2. Check the properties - verify their type, default value, available values.
  3. Check the resources.
  4. Check the terminals.

Properties Tests

  1. Start the application. Both appliances should be accessible through the IPs of their respective gateways (209.85.116.84/3 in the example above)
  2. Both appliances should serve successfully the /index.php page.
  3. Request the ip_addr_of_www1 and you should get the same as if you requested ip_addr_of_www1/index.php. Verify the following (apache2handler section):
    • Server Administrator is admin@www1.NOSPAM.host.name
    • Hostname:Port is www1.host.name:0
    • Timeouts is set to Connection: 600 - Keep-Alive: 60
    • Content-Type is set to text/html; charset=cp1251
    • Max Requests should contain "Keep Alive: off"
  4. Request a non-existing URL on www1 (for example http://ip_addr_of_www1/dummy.html) and you should get a "Not found" page with full web server description at the bottom
  5. Login on www1 and verify the following:
    • /mnt/log/test-error.log and /mnt/log/test-access.log exist and contain web server's logs with debug log level for the error log
    • The following lines can be seen inside /etc/httpd/conf.d/appl_dyn.conf:
      <Directory /var/www/html>
         AllowOverride All
      </Directory>
            
    • Also inside /etc/httpd/conf.d/appl_dyn.conf:
      AddHandler cgi-script .pl
      AddHandler perl-script .spm
      MaxClients 200
            

Functional Tests

  1. You should have Internet access on both main.www1 and main.www2 (try to ping google.com)
  2. Login on www2 and execute
    • mysql -h db
    • mysql -h aux They should both open mysql shell successfully
  3. Login on www1 and tail -f /mnt/log/test-access.log. Then request the web server by the IP address of in1 (209.85.116.84 in the example above). You should see your real IP in the test-access.log.
  4. Stop application. Mount www_data volume and create directory "foo" on it. In the directory put a single empty file "footest.html". Set docs_dir = /foo and docs_loc = /bar. Similarly create a directory "cgi" in www_data root and put a single (executable) test.cgi inside. The test.cgi file should contain
    #!/bin/bash
    echo "Content-type: text/html"
    echo
    printenv
          
    Then set scripts_dir = /cgi and scripts_loc = /cgi-bin All properties are set to www2. Also set env property to TESTVAR=TESTVAL. Start the application. You should be able to access http://209.85.116.83/bar/footest.html (empty) and http://209.85.116.83/cgi-bin/test.cgi (should output the environment). The latter enrironement should contain TESTVAR=TESTVAL.
  5. Test WEB with SugarCRM application and verify it works.

Counters Tests

Open the monitor GUI (though the editor) and add a graph with all 4 custom counters of www1 and the same for www2. Start requesting the external IPs of the WEB instances -- you should see this reflected by the counter graphs.

Sample Installs of Websites

These can be done to verify the operation of WEB, one must have the 'content' volume writeable to perform the installs described below.

Test With Bugzilla (CGI operation)

cd /mnt/content
wget http://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-2.20.tar.gz
tar -zxf bugzilla-2.20.tar.gz
ln -s bugzilla-2.20 bugzilla

# move writable files to 'data'
mv -r data /mnt/fs
mv localconfig* /mnt/fs/data
# put links in place of the original files
ln -s /mnt/fs/data data
ln -s /mnt/fs/data/localconfig localconfig
ln -s /mnt/fs/data/localconfig.js localconfig.js

perl checksetup.pl # create the initial config file
# edit the localconfig file & add your settings
# at least, set the dbase hostname to 'db'

# complete cfg (do this after connecting the database)
perl checksetup.pl

# now, the /mnt/content fs can be turned to r/o
# bugzilla should now be accessible through 'in', at /bugzilla

Testing With SquirrelMail (PHP test)

cd /mnt/content
tar -jxf squirrelmail-1.4.5.tar.bz2
mv data /mnt/fs/sqm_data
mkdir /mnt/fs/sqm_tmp

cd /mnt/content/squirrelmail-1.4.5
./configure
# set the data and attach directories to the ones above
# if you still have 'out' terminal connected to a gateway, set up 'imap' & 'smtp' appropriately,
# this will make the config test succeed (see the SquirrelMail README file)

-- IvanPeikov - 24 Sep 2007

 
Copyright © 2005-2010 3tera, Inc. All Rights Reserved.
%