Processes

Allows definition of Process objects to run as part of the test. It also store a reference of the object for later access.

class Processes
Process(name, cmdstr=None, returncode=None, startup_timeout=10)

Define a new process for the test handle.

Parameters:
  • name – The name of the process to run. This is just an identifier to use to refer to the process object

  • cmdstr – Optional command to run for this process. This can be define latter via the Command property

  • returncode – Optional value to test the process return code value with

  • startup_timeout – Optional amount of time in seconds for autest to wait for the process to start and be considered ready before erroring out.

property Default

The process that would be run by default.

Note

Only the default process will be run by default. Processes defined at a test level don’t have to define a default process. Processes define as part of the TestRun object must define a default process. Other process will not start by default and have to be define to StartBefore or StartAfter the default process or a process the is connected to the default process.

Note

The name argument is used to define an a name attribute that can be used to access the process later. This name should be friendly to values that can be used to define variable in python.

Example

Test.Processes.Process("server")
Test.Processes.server.Command = "./myserver --verbose"

However it does not have to be and in cases in which the value is not safe to access as a member a diction like interface exists to access the object.

Example

Test.Processes.Process("My Server")
Test.Processes['My Server'].Command = "./myserver --verbose"