r12 - 11 Jun 2008 - 10:34:39 - StephenQYou are here: Wiki >  AppLogic23 Web > CatDynBckTp
ALERT! AppLogic 2.3 Beta Documentation The latest production release is AppLogic 3.0.30

BCK: Backup Enabler - Test Plan

Preparation

Host platform

The tests described here for the BCK appliance are designed to run on an AppLogic grid.

3rd-party tools

None.

Tests Summary

All of the BCK operations can be initiated through a browser interface on BCKCTL. This does not lend itself readily to automated testing. The tests are performed in conjuction with the BackupHelper reference application and serve to test it as well.

Operational Tests

  • backup test - for each service, S3, Nirvanix, DynaVol_ftp, DynaVol_sftp, ftp and sftp, verify:
    • original application is re-started
    • container is made if necessary
    • backup is created as split objects/files
    • _impex files are deleted
    • backups are pruned
    • BackupHelper is destroyed
  • restore test - for each service verify:
    • restored application is created and starts
    • _impex files are deleted
    • BackupHelper is destroyed
  • cancel test - verify upon cancel that BackupHelper is stopped and destroyed, and lock file is deleted.
  • delete test - for each service verify upon delete that remote objects/files are removed
  • schedule test - verify each of none, daily, weekly and monthly causes backups to be made (or not)

If these tests pass, it is also verified for BCK that: lock files are properly created and destroyed; log files are properly created and destroyed; terminals in and net are functioning; properties backup_*, schedule_* and grid_* properly affect operation.

If these tests pass, it is also verified for BackupHelper that: all application properties are correctly provisioned and affect operation; application backup and restore function.

GUI Tests

  • authentication test - verify empty username and explicitly set username/password function
  • existing target test - verify existing target app detected during restore
  • existing helper test - verify existing BackupHelper detection prevents backup, restore and cancel
  • lock file test - verify existing lock file detected
  • service verification test - verify remote service is verified as accessible before provisioning BackupHelper for backup or restore
  • aux terminal test - verify aux terminal is functioning
  • monitor test - verify application and BackupHelper logs are monitored during backup and restore
  • completion test - verify status complete messages are displayed during backup, restore and cancel
  • browser test - verify GUI functions in IE6x, IE7x and FireFox 2x

If these tests pass, it is also verified for BCK that: properties gui_* properly affect operation.

Failure Tests

  • service access failure - verify that failure to access the remote service is caught in the GUI before operations proceed
  • grid access failure - verify that failure to access the grid controller is caught in the GUI before operations proceed
  • _impex size failure - verify that if the application size is greater than the _impex volume size then backup and restore are prohibited
  • put and get failure - verify that BackupHelper re-tries on failure of put and get to and from the remote service
  • property value failure - verify that if property values are not sane the GUI prevents backup and restore
  • cleanup test - verify that both cancel and put failure cleanup remote files

Example Test

  • example test - verify the steps in the example are sufficient and work.

Running the Tests

To run the tests, prepare a grid with a functioning public key.

Copy and uncompress the test application archive file bck-tst-app.tar.bz2. Import the test application. Update the grid.private.key and sftp.private.key files with usable keys.

This is a diagram of the test harness application:

bck_test_app.png

Design

Structure

The test application comprises the following:

  • one AppLogic application (test harness) containing the BCK component, an input gateway IN, a net gateway NET, a monitor MON and a webserver WEB.

Connection of the BCK aux terminal to WEB allows for testing of aux.

Test Details

To shorten the time required for the tests, set up three grids with two test applications each, using all 6 different remote services. To check that file splitting occurs, resize the bigvol volume of the test harness to 3GB. This works for S3. For DynaVol tests, this volume needs to have data on it to serve as a splittable size.

backup test

For each service manually create two backups with schedule_retain set to 1 and a new backup_container_id. Verify:
  • original application is re-started
  • container is made
  • backup is created as split objects/files
  • _impex files are deleted
  • backups are pruned
  • BackupHelper is destroyed
Set schedule_retain to 0, implying all backups should be retained, and make another backup using at least one service. Verify pruning does not occur.

restore test

For each service manually perform a restore. Verify:
  • restored application is created and starts
  • _impex files are deleted
  • BackupHelper is destroyed

cancel test

For at least one service perform both backup and restore. During each, cancel. Verify upon cancel that BackupHelper is stopped and destroyed and lock file is deleted. The cancel operation is not dependent on the remote service. It simply stops and destroys the BackupHelper and cleans up the _impex volume.

delete test

For each service perform a manual delete of one or more backups. Verify upon delete that remote objects/files are removed.

schedule test

For at least one service, for each schedule_period as daily, weekly and monthly, verify that a backup is made at the scheduled time and day. Set schedule_period to none. Re-start the BCKCTL component (or execute /var/www/html/.rc.local). Verify there is no crontab for root (/var/spool/cron/).

authentication test

Set gui_username and gui_password explictly and verify authentication is performed. Set gui_username and gui_password to empty and verify authentication is not performed. Set gui_username explicitly and gui_password to empty. Verify empty password is used for authentication.

existing target test

Attempt to restore an app using the name of already existing app. Verify existing target app is detected and restore prevented.

existing helper test

Attempt backup, restore and delete while a correctly named a BackupHelper exists. Verify BackupHelper is detected and backup and restore prevented

lock file test

Point a browser at the GUI while a backup or restore is in progress. Verify the lock file is detected and the GUI allows the user to monitor the current operation

service verification test

Edit /etc/applogic.sh and supply bad values for each service in turn. Verify remote service fails verification before provisioning BackupHelper for backup or restore

aux terminal test

Point a browser at the base IP of the GUI (without the port number). Verify the Fedora Core Test Page is presented, indicating that the aux terminal is functioning

monitor test

During backup, restore and cancel, verify both the application and BackupHelper logs are monitored.

completion test

During backup, restore and cancel, verify status complete messages are displayed.

browser test

Perform backup, restore, cancel and delete in each of IE6x, IE7x and FireFox 2x. Verify the GUI functions as expected.

service access failure

Configure BCK with unusable authentication properties (or edit /etc/applogic.sh). Verify that failure to access the remote service is caught in the GUI before operations proceed

grid access failure

With no grid.private.key file verify that failure to access the grid controller is caught in the GUI before operations proceed. Do the same with a grid.private.key file which does not authenticate.

impex size failure

Vol resize one of the application volumes to 17 GB. Verify that backup and restore are prohibited in GUI.

put and get failure

Using ftp and sftp, put to a service with insufficient disk space. Verify the put retries twice and fails properly (with a dashboard message). During restore, delete one of the remote file. Verify get retries and fails.

property value failure

Configure BCK with the same IP's for grid_ip1 and grid_ip2 (or edit /etc/applogic.sh). Verify the GUI prevents backup and restore

cleanup test

Using ftp and sftp, put to a service with insufficient disk space. Upon failure verify remote files are cleaned up. With each service, during backup execute cancel. Verify that remote files are cleaned up.

example test

Follow the the steps in the example and verify the instructions are sufficient and work.

-- StephenQ - 23 Oct 2007

 
Copyright © CA 2005-2011. All Rights Reserved.
%