r10 - 02 Nov 2007 - 20:03:23 - StephenQYou are here: Wiki >  AppLogic2 Web > CatDynMigTp
ALERT! AppLogic 2.1/2.2 Documentation The latest production release is AppLogic 2.9.9

MIG: Self-Migration Enabler - Test Plan

Preparation

Host platform

The tests described here for the MIG appliance are designed to run on a Linux system and are verified to work on Fedora Core 3. To the best of my knowledge, they don't need anything Fedora-specific and should work on other Linux distros.

3rd-party tools

None.

Tests Summary

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

Migration And Snapshot Tests

  • migration test - verify target app is created and started, MigHelper is destroyed, and source app is destroyed
  • snapshot test - verify target app is created and not started, MigHelper is destroyed, and source app is started
  • migration failure test - verify MigHelper is destroyed and source app is started
  • snapshot failure test - verify MigHelper is destroyed and source app is started
  • snapshot start test - verify manual start of snapshot does not destroy source app
  • app_config test - verify app_config in grid.info differently provisions target app
  • orphan MigHelper test - verify existing MigHelper_target_app_name on target grid is destroyed.

If these tests pass, it is also verified for MIG that: current_grid is determined on start; lock files are properly created and destroyed; log files are properly created and destroyed; terminals in and net are functioning; properties port_no, private_key_file and grid_info_file properly affect operation.

If these tests pass, it is also verified for MigHelper that: all application properties are correctly provisioned and affect operation; application stop, migrate and start function.

GUI Tests

  • authentication test - verify empty username and explicitly set username/password function
  • existing target test - verify existing target app detected
  • lock file test - verify existing lock file detected
  • available target grid test - verify all valid target grids and no invalid target grids are presented
  • mode constraint test - verify mode property constrains the interface
  • aux terminal test - verify aux terminal is functioning
  • monitor test - verify source app, MigHelper and target app logs are monitored during migration and snapshot
  • browser test - verify GUI functions in IE6x, IE7x and FireFox 2x

If these tests pass, it is also verified for MIG that: properties username, password, and mode properly affect operation.

Example Test

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

Running the Tests

To run the tests, prepare three or more grids with functioning public keys.

Copy and uncompress the test application archive file mig-tst-app.tar.bz2. Import the test application. Update the private.key file with a usable key. Edit the grid.info file to reflect the testing grids.

This is a diagram of the test harness application:

MIG_test.png

Design

Structure

The test application comprises the following:

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

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

Test Details

migration test

Migrate to each grid in a series, returning to the original. Verify target app is created and started, MigHelper is destroyed on target grid, and source app is destroyed on source grid each time.

snapshot test

Snapshot from one grid to each of the other two. Verify snapshot is created on target grid, MigHelper is destroyed on target grid, and source app is re-started.

migration failure test

Migrate to the target named "BROKEN" in the grid.info file. Verify MigHelper is destroyed on target grid and source app is re-started.

snapshot failure test

Snapshot to the target named "BROKEN" in the grid.info file. Verify MigHelper is destroyed on target grid and source app is re-started.

snapshot start test

Manually start one of the snap shots. Verify that it does not destroy the source app.

app_config test

During migration, verify that target app is provisioned correctly with different IP's than source app. Verify the same for snapshots.

orphan MigHelper test

Manually start an application named MigHelper_target_app_name on target grid. Verify migrate stops and destroys this app before provisioning a new MigHelper.

authentication test

The test harness has an empty password. Verify no authentication is performed. Change the property values to set username and password. Re-start the application and verify authentication is performed.

existing target test

Enter the name of an existing target and verify the GUI detects the existing target and refuses to migrate.

lock file test

Click the back button in the browser while the source application is still running. Verify the lock file is detected by the GUI.

available target grid test

Verify the GUI presents all valid target grids and not the source grid.

mode constraint test

The test harness has mode value both. Verify the GUI is constrained by values of migrate and snap.

aux terminal test

Point a browser at the base IP of the MIG and verify the default Apache page is displayed

monitor test

Verify the monitor functions as expected:

  • Source app, MigHelper and target app monitors display logs when available during migration
  • Source app, MigHelper and re-started source app monitors display logs when available during snapshot
  • Link to target (migrate) or source (snapshot) is presented upon detection of target app or re-started source app
  • Failure message is displayed during failure tests

browser test

Verify GUI functions in IE6.x, IE7.x and FireFox 2.x

example test

Verify the steps in the example are sufficient and work by following the example.

-- StephenQ - 12 Sep 2007

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