TestCenter Reference
TestCenterAdvanced.Slave.Slave Class Reference

The class controlling a MeVisLab slave instance. More...

Public Member Functions

 __init__ (self, cfgFile, context, offline=False)
 Initializes the slave process.
 setIsInsideTestCaseManager (self, isInsideTestCaseManager)
 setTestCaseListener (self, listener)
 loadTestCase (self, testCaseNode)
 Load the given test case.
 setAgendaTestCase (self, testCase)
 Set the test case that is used for building the agenda/function list.
 getTestCase (self)
 Returns the test case that has been run.
 unloadTestCase (self)
 Clears the loaded test case.
 runCommand (self, requestNode)
 Run a command given via the requestNode.
 run (self)
 The main method which handles all the request from the master.

Protected Attributes

 _config = Config.Configuration(cfgFile)

Detailed Description

The class controlling a MeVisLab slave instance.

The slave is controlled by a master using socket based IPC to send messages.

Definition at line 71 of file Slave.py.

Constructor & Destructor Documentation

◆ __init__()

TestCenterAdvanced.Slave.Slave.__init__ ( self,
cfgFile,
context,
offline = False )

Initializes the slave process.

Parameters
cfgFileThe configuration file used for this test run.
contextThe context used for testing.
offlineSpecifies whether the tests are run in same MeVisLab instance as master.

Definition at line 76 of file Slave.py.

References __agendaTestCase, TestCenterAdvanced.Master.Master.__com, __com, TestCenterAdvanced.Slave.TestCaseRemoteListener.__com, __ctx, TestCenterAdvanced.Master.Master.__isInsideTestCaseManager, __isInsideTestCaseManager, __running, __testCase, TestCenterAdvanced.Master.Master.__testCaseListener, __testCaseListener, TestCenterAdvanced.Master.Master.__testCfg, and __testCfg.

Member Function Documentation

◆ getTestCase()

TestCenterAdvanced.Slave.Slave.getTestCase ( self)

Returns the test case that has been run.

Used in the TestCaseManager to keep test case after execution.

Returns
The test case object.

Definition at line 161 of file Slave.py.

References __testCase.

◆ loadTestCase()

TestCenterAdvanced.Slave.Slave.loadTestCase ( self,
testCaseNode )

Load the given test case.

If the test case could not be loaded "None" is returned.

Parameters
testCaseNodeXML representation containing information on the test case to load.
Returns
The loaded test case.

Definition at line 119 of file Slave.py.

References __loadTestCase().

Referenced by unloadTestCase().

◆ run()

TestCenterAdvanced.Slave.Slave.run ( self)

The main method which handles all the request from the master.

Definition at line 716 of file Slave.py.

References TestCenterAdvanced.Master.Master.__com, __com, TestCenterAdvanced.Slave.TestCaseRemoteListener.__com, __running, and runCommand().

Referenced by unloadTestCase().

◆ runCommand()

TestCenterAdvanced.Slave.Slave.runCommand ( self,
requestNode )

◆ setAgendaTestCase()

TestCenterAdvanced.Slave.Slave.setAgendaTestCase ( self,
testCase )

Set the test case that is used for building the agenda/function list.

Used in the TestCaseManager module to make local testing possible.

Parameters
testCaseThe test case object.

Definition at line 153 of file Slave.py.

References __agendaTestCase.

◆ setIsInsideTestCaseManager()

TestCenterAdvanced.Slave.Slave.setIsInsideTestCaseManager ( self,
isInsideTestCaseManager )

◆ setTestCaseListener()

TestCenterAdvanced.Slave.Slave.setTestCaseListener ( self,
listener )

Definition at line 116 of file Slave.py.

References TestCenterAdvanced.Master.Master.__testCaseListener, and __testCaseListener.

Referenced by runCommand(), and unloadTestCase().

◆ unloadTestCase()

Member Data Documentation

◆ _config

TestCenterAdvanced.Slave.Slave._config = Config.Configuration(cfgFile)
protected

Definition at line 94 of file Slave.py.

Referenced by unloadTestCase().


The documentation for this class was generated from the following file:
  • MeVisLab/Standard/Modules/Macros/Tests/TestCenterAdvanced/Slave.py