Squirt 3.21
OaGuiTest Class Referenceabstract

Base class for Splash GUI test cases. More...

Public Member Functions

public OaGuiTest ()
 The Default Constructor.
 
public int setUp ()
 Initializes the test runtime before each test suite. More...
 
public int beforeTc (const string &testCaseId)
 Prepares per-test-case capture output and delegates to OaTest hook. More...
 
public int tearDown ()
 Finalizes the test runtime after each test suite. More...
 
protected void setVpPrefix (const string &vpPrefix)
 Sets a VP prefix used for reference lookup. More...
 
protected int assertVP (const string &vpId, const vector< shape > &shapes, const string note="", float timeout=2.0)
 Validates all panel shapes against a stored VP reference. More...
 
public int assertAttributes (const string &shapeName, const mapping &testAttributes, const string note="", float timeout=2.0)
 Verifies one panel shape against expected attributes. More...
 
public void setFileScript (string rootTestFileName)
 Stores the root script path used to resolve per-test assets. More...
 
public int play ()=0
 Executes the concrete test logic. More...
 

Protected Member Functions

protected bool isTestFunction (const mapping &func)
 Checks whether a function descriptor matches a runnable test method. More...
 
protected void waitForPanelInit ()
 Waits for initial panel state to be ready before assertions run.
 

Protected Attributes

protected SquirtInputEventPlayer player
 Player wrapper used to drive GUI input events.
 
protected OaGuiTestScreenCapture capture
 Screen capture helper for evidence on pass/fail.
 
protected string rootTestFileName
 Path to the source script file for this test instance.
 
protected string vpPrefix
 Prefix used for VP identifiers.
 

Detailed Description

Base class for Splash GUI test cases.

Provides common setup and shape attribute assertions for panel tests.

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

Member Function Documentation

◆ assertAttributes()

public int OaGuiTest::assertAttributes ( const string &  shapeName,
const mapping &  testAttributes,
const string  note = "",
float  timeout = 2.0 
)

Verifies one panel shape against expected attributes.

Parameters
shapeNameRelative name path of the shape.
testAttributesExpected attribute/value map.
noteOptional assertion note for reporting.
timeoutMaximum wait time for delayed UI updates.
Returns
0 if attributes match, otherwise abort/fail handling is triggered.

◆ assertVP()

protected int OaGuiTest::assertVP ( const string &  vpId,
const vector< shape > &  shapes,
const string  note = "",
float  timeout = 2.0 
)

Validates all panel shapes against a stored VP reference.

Parameters
vpIdVP identifier relative to configured prefix.
shapesShapes expected on the current panel.
noteOptional assertion note for reporting.
timeoutMaximum wait time per shape verification.
Returns
0 if all shapes match, -1 on first mismatch.

◆ beforeTc()

public int OaGuiTest::beforeTc ( const string &  testCaseId)

Prepares per-test-case capture output and delegates to OaTest hook.

Parameters
testCaseIdLogical test case identifier.
Returns
Return code from OaTest::beforeTc().

◆ isTestFunction()

protected bool OaGuiTest::isTestFunction ( const mapping &  func)
protected

Checks whether a function descriptor matches a runnable test method.

Parameters
funcReflection metadata entry from class inspection.
Returns
TRUE for public int functions starting with "play".

◆ play()

public int OaGuiTest::play ( )
pure virtual

Executes the concrete test logic.

Returns
0 on success.

◆ setFileScript()

public void OaGuiTest::setFileScript ( string  rootTestFileName)

Stores the root script path used to resolve per-test assets.

Parameters
rootTestFileNameAbsolute script file name.

◆ setUp()

public int OaGuiTest::setUp ( )

Initializes the test runtime before each test suite.

Returns
0 on success, -1 on setup failure.

◆ setVpPrefix()

protected void OaGuiTest::setVpPrefix ( const string &  vpPrefix)

Sets a VP prefix used for reference lookup.

Parameters
vpPrefixPrefix prepended to VP identifiers.

◆ tearDown()

public int OaGuiTest::tearDown ( )

Finalizes the test runtime after each test suite.

Returns
Return code from OaTest::tearDown().

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