Squirt 3.21
Splash Class Reference

Controls recording and playback orchestration for Splash test scripts. More...

Public Member Functions

public Splash (bool bPlayback=FALSE, bool bRecord=FALSE)
 The Default Constructor. More...
 
public synchronized string getScriptPath ()
 Returns and creates the Splash script directory if needed. More...
 
void reactOnCommands (eSplash splashMode, string sDP, string sCommand, string sDP2, string sResponse)
 Handles incoming Splash commands for play and record workflows. More...
 
public void record (string sTestCase, string sPanelFile, string sParams="")
 Starts recording mode and launches UI process. More...
 
public void stop (string sTestCase, string sPanel, string sParams)
 Stops recording and optionally writes script to panel/testcase path. More...
 
public void play (string sTestCase, string sPanelFile, string startParams="")
 Starts playback by launching the UI manager. More...
 
public void startManager (string sTestCase, string sPanelFile, string startParams="")
 Starts UI process for playback execution. More...
 
public string getParamsFromScript (string sScriptFile)
 Reads optional parameter line from a test script header. More...
 

Static Public Member Functions

static public int initInterface ()
 Initializes Splash datapoints when missing. More...
 
static private void setCommandOnDP (string sCommand)
 Writes a command to Splash command/response datapoints. More...
 
static private bool isSafeTestScriptPath (const string &path)
 Checks whether a generated test path stays below scripts/tests. More...
 
static private string getCommandFromDP ()
 Reads current command payload from Splash datapoint. More...
 
static public void onClose ()
 Converts active record command to stop when panel is closing.
 
static public eSplash getStateFromString (const string &sCommand)
 Converts textual Splash command to enum state. More...
 

Static Public Attributes

static public string sTestScriptPath
 Root directory where generated Splash scripts are stored.
 

Detailed Description

Controls recording and playback orchestration for Splash test scripts.

Attention
This documentation is created with the help of an artificial intelligence.

Constructor & Destructor Documentation

◆ Splash()

public Splash::Splash ( bool  bPlayback = FALSE,
bool  bRecord = FALSE 
)

The Default Constructor.

Parameters
bPlaybackEnables playback command handling.
bRecordEnables recording command handling.

Member Function Documentation

◆ getCommandFromDP()

static private string Splash::getCommandFromDP ( )
static

Reads current command payload from Splash datapoint.

Returns
Current Splash command string.

◆ getParamsFromScript()

public string Splash::getParamsFromScript ( string  sScriptFile)

Reads optional parameter line from a test script header.

Parameters
sScriptFileScript file path.
Returns
Extracted parameter string or empty string.

◆ getScriptPath()

public synchronized string Splash::getScriptPath ( )

Returns and creates the Splash script directory if needed.

Returns
Absolute script directory path.

◆ getStateFromString()

static public eSplash Splash::getStateFromString ( const string &  sCommand)
static

Converts textual Splash command to enum state.

Parameters
sCommandCommand payload string.
Returns
Matching splash state.

◆ initInterface()

static public int Splash::initInterface ( )
static

Initializes Splash datapoints when missing.

Returns
0 on success.

◆ isSafeTestScriptPath()

static private bool Splash::isSafeTestScriptPath ( const string &  path)
static

Checks whether a generated test path stays below scripts/tests.

Parameters
pathProject-relative test script path.
Returns
true when the path is a safe relative .ctl path.

◆ play()

public void Splash::play ( string  sTestCase,
string  sPanelFile,
string  startParams = "" 
)

Starts playback by launching the UI manager.

Parameters
sTestCaseTest case script.
sPanelFilePanel file to open.
startParamsOptional playback parameters.

◆ reactOnCommands()

void Splash::reactOnCommands ( eSplash  splashMode,
string  sDP,
string  sCommand,
string  sDP2,
string  sResponse 
)

Handles incoming Splash commands for play and record workflows.

Parameters
splashModeCurrent command mode.
sDPTriggering datapoint.
sCommandReceived command payload.
sDP2Response datapoint.
sResponseResponse payload.

◆ record()

public void Splash::record ( string  sTestCase,
string  sPanelFile,
string  sParams = "" 
)

Starts recording mode and launches UI process.

Parameters
sTestCaseTest case identifier.
sPanelFilePanel to record.
sParamsAdditional startup parameters.

◆ setCommandOnDP()

static private void Splash::setCommandOnDP ( string  sCommand)
static

Writes a command to Splash command/response datapoints.

Parameters
sCommandCommand payload.

◆ startManager()

public void Splash::startManager ( string  sTestCase,
string  sPanelFile,
string  startParams = "" 
)

Starts UI process for playback execution.

Parameters
sTestCaseTest case script.
sPanelFilePanel file to open.
startParamsOptional startup parameters.

◆ stop()

public void Splash::stop ( string  sTestCase,
string  sPanel,
string  sParams 
)

Stops recording and optionally writes script to panel/testcase path.

Parameters
sTestCaseTest case identifier.
sPanelPanel file name.
sParamsAdditional command parameters.

The documentation for this class was generated from the following file: