Package apama :: Module runner :: Class ApamaRunner
[hide private]
[frames] | no frames]

Class ApamaRunner

source code

                    object --+        
                             |        
pysys.process.user.ProcessUser --+    
                                 |    
       pysys.baserunner.BaseRunner --+
                                     |
                                    ApamaRunner

Instance Methods [hide private]
 
__init__(self, record, purge, cycle, mode, threads, outsubdir, descriptors, xargs)
Override the constructor of the base class to create required output directory.
source code
 
isPurgableFile(self, path)
This method is called by testComplete to provide runners with the ability to veto deletion of non-empty files that should always be left in a test's output directory even when the test has passed, by returning False from this method.
source code
 
purgeDirectory(self, dir, delTop=False)
Recursively purge a directory removing all files and sub-directories.
source code
 
testComplete(self, testObj, dir)
Test complete method which performs completion actions after execution of a testcase.
source code

Inherited from pysys.baserunner.BaseRunner: containerCallback, containerExceptionCallback, cycleComplete, handleKbrdInt, printSummary, setKeywordArgs, setup, start

Inherited from pysys.process.user.ProcessUser: __getattr__, abort, addCleanupFunction, addOutcome, allocateUniqueStdOutErr, cleanup, getInstanceCount, getNextAvailableTCPPort, getOutcome, getOutcomeReason, logFileContents, signalProcess, startProcess, stopProcess, waitForFile, waitForSignal, waitForSocket, waitProcess, writeProcess

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Instance Variables [hide private]

Inherited from pysys.baserunner.BaseRunner: log, mode, outsubdir, project

Inherited from pysys.process.user.ProcessUser: input, output

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, record, purge, cycle, mode, threads, outsubdir, descriptors, xargs)
(Constructor)

source code 

Override the constructor of the base class to create required output directory.

Parameters:
  • record - Indicates if the test results should be recorded
  • purge - Indicates if the output subdirectory should be purged on PASSED result
  • cycle - The number of times to execute the set of requested testcases
  • mode - The user defined mode to run the testcases in
  • threads - The number of worker threads to execute the requested testcases
  • outsubdir - The name of the output subdirectory
  • descriptors - List of XML descriptor containers detailing the set of testcases to be run
  • xargs - The dictionary of additional arguments to be set as data attributes to the class
Overrides: object.__init__

isPurgableFile(self, path)

source code 

This method is called by testComplete to provide runners with the ability to veto deletion of non-empty files that should always be left in a test's output directory even when the test has passed, by returning False from this method. For example this could be used to avoid deleting code coverage files.

By default this will return True.

Parameters:
  • path - The absolute path of the file to be purged
Overrides: pysys.baserunner.BaseRunner.isPurgableFile
(inherited documentation)

purgeDirectory(self, dir, delTop=False)

source code 

Recursively purge a directory removing all files and sub-directories.

Parameters:
  • dir - The top level directory to be purged
  • delTop - Indicates if the top level directory should also be deleted

testComplete(self, testObj, dir)

source code 

Test complete method which performs completion actions after execution of a testcase.

The testComplete method performs purging of the output subdirectory of a testcase on completion of the test execution. Purging involves removing all files with a zero file length in order to only include files with content of interest. Should self.purge be set, the purging will remove all files (excluding the run.log) on a PASSED outcome of the testcase in order to reduce the on-disk memory footprint when running a large number of tests. Should a custom testComplete for a subclass be required, the BaseRunner testComplete method should first be called.

Parameters:
  • testObj - Reference to the pysys.basetest.BaseTest instance of the test just completed
  • dir - The directory to perform the purge on
Overrides: pysys.baserunner.BaseRunner.testComplete
(inherited documentation)