.\" Manpage for mtest .\" Contact mail@wagnertech.de to correct errors or typos. .TH MTEST 7 "06 May 2021" "0.1" "User Commands" .SH NAME mtest \- automated test infrastructure .SH DESCRIPTION .B mtest is a automated test infrastructure that uses the FitNesse test driver. For using this tool you have to start .B runBackend in an (empty) directory with an empty directory named FitnessePages inside. mtest provides two fixture classes: CallPhp, CallScript .TP 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: .B setPhpConfig .I config_path : set path of the PHP interface configuration. A file CallPhp.config is expected there. .B setApplicationPath .I app_path : sets the application path. The mtest class loader expects the interface classes in the subdirectories of .I app_path. .B setUtilDir .I util_dir : sets path to the util PHP software. .B phpInterface .I php_interface : name of the PHP interface class .B phpProcedure .I php_procedure : method of the interface class .B setParameter .I name value : sets name/value pairs of the parameteres of .I php_procedure. .B executeAction : executes the action defined with the parameters above. .B storeResultTo .I name : stores the result of the previous executed action to a variable called .I name. This variable can be in setParameter fixtures with a preceeding $-sign. .B resultContains .I word [pCount] : checks if .I word is contained in the result of the last executed action. If .I pCount is present, .I word has to occur exactly .I pCount times. .TP CallScript is used to execute shell script commands. It provides the following fixtures: .B setScriptDirectory .I dir : expands PATH by .I dir. .B callScript .I script : executes .I script. .PP mtest provides the script .B mtestinfo .I [package1 package2 ...]. This script outputs information on the given packages, date, OS, archticture. It can be called by .B CallScript. .SH FILES Some example files: .TP PHP interface description http://wagnertech.de/svn/SysAl/src/AlarmInterface/RemoteInterface/CallPhp.config .TP Syntax of Fitnesse files for use of CallPhp, CallScript: http://wagnertech.de/svn/SysAl/Test/FitnessePages/RestApi/TestWatchdog/content.txt .SH SEE ALSO http://fitnesse.org/ .SH BUGS No known bugs. .SH AUTHOR Michael Wagner (michael@wagnertech.de)