Peach :: agent :: AgentClient :: Class AgentClient
[hide private]

Class AgentClient

source code

An Agent client. Clients connect and send/recieve messages with a single remote Agent.

Instance Methods [hide private]
 
__init__(self, agentUri, password, pythonPaths=None, imports=None)
Creates and Agent instance and attemps to connect to the AgentMaster.
source code
 
Connect(self)
Connect to agent.
source code
 
Reconnect(self)
Reconnect to remote agent
source code
 
StartMonitor(self, name, classStr, params, restarting=False) source code
 
StopMonitor(self, name) source code
 
OnTestStarting(self)
Called right before start of test.
source code
 
OnTestFinished(self)
Called right after a test.
source code
 
GetMonitorData(self)
Get any monitored data.
source code
 
DetectedFault(self)
Check if a fault was detected.
source code
 
OnFault(self)
Called when a fault was detected.
source code
 
OnShutdown(self)
Called when Agent is shutting down.
source code
 
StopRun(self)
Return True to force test run to fail.
source code
 
PublisherInitialize(self, name, cls, args) source code
 
PublisherStart(self, name) source code
 
PublisherStop(self, name) source code
 
PublisherAccept(self, name) source code
 
PublisherConnect(self, name) source code
 
PublisherClose(self, name) source code
 
PublisherCall(self, name, method, args) source code
 
PublisherProperty(self, name, property, value=None) source code
 
PublisherSend(self, name, data) source code
 
PublisherReceive(self, name, size=None) source code
Method Details [hide private]

__init__(self, agentUri, password, pythonPaths=None, imports=None)
(Constructor)

source code 

Creates and Agent instance and attemps to connect to the AgentMaster. If connection works the Client Hello message is sent.

Parameters:
  • agentUri (string) - Url of agent
  • password (string) - [optional] Password to authenticate to agent. Warning: CLEAR-TEXT!!
  • pythonPaths (list) - List of paths we should configure on the remote agent
  • imports (list) - list of imports that should be performed on the remote agent

Connect(self)

source code 

Connect to agent. Will retry the connection 10 times before giving up.

StopRun(self)

source code 

Return True to force test run to fail. This should return True if an unrecoverable error occurs.