Trees | Indices | Help |
---|
|
Class providing basic operations over interacting with processes.
The ProcessUser class provides the mimimum set of operations for managing and interacting with processes. The class is designed to be extended by the pysys.baserunner.BaseRunner and pysys.basetest.BaseTest classes so that they prescribe a common set of process operations that any application helper classes can use, i.e. where an application helper class is instantiated with a call back reference to the runner or base test for the process operations.
|
|||
|
|||
|
|||
integer |
|
||
handle |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
Return the number of processes started within the testcase matching the supplied displayName. The ProcessUserInterface class maintains a reference count of processes started within the class instance via the startProcess() method. The reference count is maintained against a logical name for the process, which is the displayName used in the method call to startProcess(), or the basename of the command if no displayName was supplied. The method returns the number of processes started with the supplied logical name, or 0 if no processes have been started.
|
Start a process running in the foreground or background, and return the process handle. The method allows spawning of new processes in a platform independent
way. The command, arguments, environment and working directory to run the
process in can all be specified in the arguments to the method, along
with the filenames used for capturing the stdout and stderr of the
process. Processes may be started in the
|
Send a soft or hard kill to a running process to stop its execution. This method uses the pysys.process.helper module to stop a running process.
|
Send a signal to a running process (Unix only). This method uses the pysys.process.helper module to send a signal to a running process.
|
Wait for a process to terminate, return on termination or expiry of the timeout.
|
Write data to the stdin of a process. This method uses the pysys.process.helper module to write a data string to the stdin of a process. This wrapper around the write method of the process helper only adds checking of the process running status prior to the write being performed, and logging to the testcase run log to detail the write.
|
Wait for a socket connection to be established. This method blocks until connection to a particular host:port pair can be established. This is useful for test timing where a component under test creates a socket for client server interaction - calling of this method ensures that on return of the method call the server process is running and a client is able to create connections to it. If a connection cannot be made within the specified timeout interval, the method returns to the caller.
|
Wait for a file to be written to disk. This method blocks until a file is created on disk. This is useful for test timing where a component under test creates a file (e.g. for logging) indicating it has performed all initialisation actions and is ready for the test execution steps. If a file is not created on disk within the specified timeout interval, the method returns to the caller.
|
Wait for a particular regular expression to be seen on a set number of lines in a text file. This method blocks until a particular regular expression is seen in a
text file on a set number of lines. The number of lines which should
match the regular expression is given by the
|
Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Fri Aug 15 14:58:00 2014 | http://epydoc.sourceforge.net |