MTEST

NAME
DESCRIPTION
FILES
SEE ALSO
BUGS
AUTHOR

NAME

mtest - automated test infrastructure

DESCRIPTION

mtest is a automated test infrastructure that uses the FitNesse test driver. For using this tool you have to start runBackend in an (empty) directory with an empty directory named FitnessePages inside.

mtest provides two fixture classes: CallPhp, CallScript
CallPhp

This fixture builds a XML file with infomation which PHP class has to instantiated and which method has to be called with which parameters. Prerequisite is a XML description file of the PHP interface class. References to examples, see below.

CallPhp needs PHP code. This code is shipped with the mutil package. This code hase to be copied into tested PHP code.

CallPhp provides the following fixtures:

setPhpConfig config_path : set path of the PHP interface configuration. A file CallPhp.config is expected there.

setApplicationPath app_path : sets the application path. The mtest class loader expects the interface classes in the subdirectories of app_path.

setUtilDir util_dir : sets path to the util PHP software.

phpInterface php_interface : name of the PHP interface class

phpProcedure php_procedure : method of the interface class

setParameter name value : sets name/value pairs of the parameteres of php_procedure.

executeAction : executes the action defined with the parameters above.

storeResultTo name : stores the result of the previous executed action to a variable called name. This variable can be in setParameter fixtures with a preceeding $-sign.

resultContains word [pCount] : checks if word is contained in the result of the last executed action. If pCount is present, word has to occur exactly pCount times.

CallScript

is used to execute shell script commands. It provides the following fixtures:

setScriptDirectory dir : expands PATH by dir.

callScript script : executes script.

mtest provides the script mtestinfo [package1 package2 ...]. This script outputs information on the given packages, date, OS, archticture. It can be called by CallScript.

FILES

Some example files:
PHP interface description

http://wagnertech.de/svn/SysAl/src/AlarmInterface/RemoteInterface/CallPhp.config

Syntax of Fitnesse files for use of CallPhp, CallScript:

http://wagnertech.de/svn/SysAl/Test/FitnessePages/RestApi/TestWatchdog/content.txt

SEE ALSO

http://fitnesse.org/

BUGS

No known bugs.

AUTHOR

Michael Wagner (michael@wagnertech.de)