This function checks a return code against an expected return code return code received from command the output of the result the expected return code 'RC=%s, Result=Ok' % (returncode) 'RC=%s, Result=%s' % (returncode,result) 'RC=%s, Expected %s, Result=%s' % (returncode,expected,result) RC This function checks the return code against an expected return code for a testcase return code received from command the output of the result the expected return code 'SUCCESS: RC=%s, Expected %s, Result=%s' % (returncode,expected,result) 'ERROR : RC=%s, Expected %s, Result=%s' % (returncode,expected,result) This function checks the return string against an expected return substring for a testcase the substring expected from the command the return string received from command 'Found substring, %s, in the return string' % (expectedString) 'Did not find substring, %s, in the return string, %s' % (expectedString, returnString) This function checks the return string against an expected return substring that should not be present for a testcase the substring being tested from the command the return string received from command 'Did Not Find substring, %s, in the return string' % (testString) 'Found substring, %s, in the return string, %s' % (testString, returnString) This function simply searches a string for a substring the substring being tested from the command the return string received from command 'Did Not Find substring, %s, in the return string' % (testString) 'Found substring, %s, in the return string' % (testString) returnCode Checks that the ldap server is running Location of target host Pathname to installation root Number of iterations Number of seconds to wait between iterations Directory server hostname or IP address Directory server port number Bind DN Bind password { 'location' : mylocation, 'dsPath' : mypath, 'dsInstanceHost' : myhost , 'dsInstancePort' : myport , 'dsInstanceDn' : mydn , 'dsInstancePswd' : mypswd , 'dsScope' : 'base' , 'dsBaseDN' : 'cn=config' , 'dsFilter' : 'objectclass=*' , 'expectedRC' : 'noCheck' } { 'sleepForMilliSeconds' : noOfMilliSeconds } Sleep for number of milliseconds Location of target host Number of milliseconds to sleep '%s' % location 'delay' 'delay %i' % sleepForMilliSeconds { 'returncode' : RC , 'result' : STAFResult } Set OS related variables Name of host on which to retrieve variables '%s' % hostname 'var' 'get system var STAF/Config/OS/Name' 'OS Name= %s' % STAFResult STAFResult Pretty prints a banner at the start of a test. '' '****************************************************' '*** STARTING TEST CASE %s.' % STAXCurrentTestcase '***' Pretty prints a banner at the end of a test. '***' '*** ENDING TEST CASE %s.' % STAXCurrentTestcase '****************************************************' '' Performs all the preoperations for a test case Performs all the post operations for a test suite 'A signal (%s) was raised during this test case' % SignalRaised '## Test Verdict: FAIL ##' '## Test Verdict: PASS ##' Performs all the pre operations for a test suite '#### %s/%s suite preamble ####' % (ThisGroupName,ThisSuiteName) Performs all the post operations for a test suite '#### %s/%s suite postamble ####' % (ThisGroupName,ThisSuiteName) { 'starttime' : TestSuiteStartTime, 'endtime' : TestSuiteEndTime, 'tofile' : TestLogFile } Performs all the pre operations for a test group '##### %s group preamble #####' % ThisGroupName Performs all the post operations for a test group '##### %s group postamble #####' % ThisGroupName Queries the staf logs for the test case and write to file as text timestamp to start logging from timestamp to start logging to name of file to write the logs { 'location' : STAXServiceMachine, 'logname' : 'STAX_Job_%s_User' % STAXJobID, 'startfrom' : starttime, 'endat' : endtime } { 'queryresult' : STAFResult, 'logfile' : tofile } Process staf log query results and write them to a file result of the staf log query name of the log file to where results are written 'Creating test log %s' % logfile { 'location' : STAXServiceMachine, 'foldername' : NewLogDir } check the number of matching sub-string in a string the sub-string to check the main string where the search is done number of expected sub-string that must be in the main string '%s' % myMessage '%s' % myMessage myRC,myMessage Name of the function to run Arguments to be passed on to the called function. This can be a map or a list of arguments, whatever the called function expects will be carried on here. . for a map, pass the arguments like this: { 'argumentA' : 'argumentAvalue' , 'argumentB' : 1 , ... } . for a list, pass the arguments like this: [ 'argumentAvalue, 1, ... ] The expected return code of the function to run. This is then passed onto the checkRC function. It is also used to throw an exception if the argument functionException is provided and set the test case status if the argument functionSetsTCStatus is provided The exception to throw if the return code differs from the expected RC. The exception is appended to STAXException. An optional message to display before running the function Whether the function to run sets the testcase status or not. If this is set, the test case status is set according to whether or not the function meets the expected return code. True or False should be used for this argument. If this argument is provided, a testcase will be created with this argument's value for name and set to fail only upon failure If this argument is provided, a signal will be raised upon unsuccesful execution of the function to run If this argument is provided then functionCallBack will be called after the execution of function name. This allows to specify arguments for the call back function '%s' % functionMessage 'runFunction: %s: called with parameters [%s]' % (functionName,functionArguments) functionArguments 'runFunction: %s: returned [%s] with [%s]' % (functionName,RC,STAXResult) _functionRC