MP TestAgent

The MP TestAgent is an application testing framework for the Grid MP Platform. It mimics the behaviour of the real MP Agent, but without the Agent, server communication, or screensaver. From the point of view of the program module, the runtime environment is the same as it would be running under the MP Agent. That is, all the UD TAPI calls function identically as they would under the MP Agent.

Features

GUI Testagent

TestAgent Screen Shot

Field Descriptions

Configuration
The Configuration selection allows you to select which saved configuration to load. Saving configurations is useful if you are testing more than one application module. The saved configurations are stored in the Windows registry under HKEY_CURRENT_USER\Software\United Devices\TestAgent.
New
The New button creates a new saved configuration. You will be prompted for the new name.
Delete
The Delete button deletes a saved configuration. You will be prompted for confirmation.
Program module
This is the name of the executable to run. This field is actually parsed as a command line, so if you would like to run your executable under a debugger, you might specify "msdev prog_module.exe" instead of "prog_module.exe".
Graphics library
The name of the graphics library DLL to load. If your program does not have a graphics library, leave this field blank.
Input packages
The paths to the unencrypted input data packages, semi-colon-seperated. When the program module is run, this file is automatically encrypted so the program module can read it through the UD API.
Result package
The name of the unencrypted result package. When the program module completes, the program result package is automatically decrypted and the contents are placed in this file.
View result package after program completion
If this option is checked, a viewer for the result package will be automatically launched after the program module completes.
View now
This button will view the result file after program completion.
CPU Usage
This area will show the CPU time used by the program module itself, and by the graphics library.
Program Memory Usage
This area will show the memory usage for the program module as reported by the operating system.
Run
Start the program module running. If a graphics library has been set, a window will be opened to display the program graphics.
Stop
Request the program module to stop running.
Close
Close the TestAgent. Any changes made to any of the Parameters fields are automatically saved.

CLI TestAgent

Usage

$ ./ta programmodule resultpackage [inputpackage [inputpackage [...]]]

Arguments

programmodule
(required) the path to the program module executable you want to execute.
resultpackage
(required) the name of the unencrpyted result package.
inputpackage
(0 or more allowed) a list of data-package files as created by buildpkg

Execution

During execution, the Testagent will print some debugging information on the screen. These informational messages are all prefixed by TESTAGENT:.
If you hit CTRL-C during execution, the testagent will send an official UD TAPI shutdown request to your program module. A sample run would produce information like:

$ ./ta oic_wrapped testout.gz oic_data_excl.tar oic_data_text.tar
TESTAGENT: Starting up
TESTAGENT: Removing previous state
TESTAGENT: Initializing and copying input files... (0) (1) done
TESTAGENT: Starting program...
TESTAGENT: runtime 0 seconds; 0 checkpoints (avg nan); 0.00% done
TESTAGENT: Program forked, waiting for program to finish
TESTAGENT: runtime 5 seconds; 1 checkpoints (avg 5.00); 1.00% done
TESTAGENT: runtime 10 seconds; 1 checkpoints (avg 10.00); 4.00% done
TESTAGENT: requesting shutdown of program   <-- user hit CTRL-C here
TESTAGENT: Program ended with exit code 2

$ ./ta oic_wrapped testout.gz oic_data_excl.tar oic_data_text.tar
TESTAGENT: Starting up
TESTAGENT: Previous state found, remove state and start from beginning? [Y/n]n
TESTAGENT: Previous state preserved
TESTAGENT: Initializing and copying input files... (0) (1) done
TESTAGENT: Starting program...
TESTAGENT: runtime 0 seconds; 0 checkpoints (avg nan); 0.00% done
TESTAGENT: Program forked, waiting for program to finish
TESTAGENT: runtime 10 seconds; 1 checkpoints (avg 10.00); 4.00% done
TESTAGENT: runtime 15 seconds; 2 checkpoints (avg 7.50); 6.00% done
TESTAGENT: runtime 20 seconds; 2 checkpoints (avg 10.00); 8.00% done
...
TESTAGENT: runtime 200 seconds; 20 checkpoints (avg 10.00); 92.00% done
TESTAGENT: runtime 205 seconds; 21 checkpoints (avg 9.76); 94.00% done
TESTAGENT: runtime 210 seconds; 21 checkpoints (avg 10.00); 96.00% done
TESTAGENT: runtime 215 seconds; 22 checkpoints (avg 9.77); 99.00% done
TESTAGENT: Program ended with exit code 0

After execution, the current directory will contain several tempfiles, named "testagent.*.tmp". You can safely delete these files. If you want to take advantage of restarting from a checkpoint, you should leave all these files in place.
Useful other files that are created are:


$Id: TestAgent.html,v 1.11 2003/02/24 23:10:11 ivo Exp $