NDEVR
API Documentation
LoopedAutomatedTest

A type of AutomatedTest that repeatedly loops until stopped by the user. More...

Inheritance diagram for LoopedAutomatedTest:
[legend]
Collaboration diagram for LoopedAutomatedTest:
[legend]

Public Member Functions

 LoopedAutomatedTest (const std::function< void(uint04 step_index, AutomatedTestingDialog *dialog)> &test_step)
 Constructs a LoopedAutomatedTest with the given step function.
bool performTest (AutomatedTestingDialog *dialog)
 Starts the looped test, calling the step function repeatedly on a timer.
void stopTest ()
 Stops the looped test timer.
uint04 testStepIndex () const
 Returns the current step index within the loop.

Protected Attributes

AutomatedTestingDialogm_dialog = nullptr
 The testing dialog reference.
std::function< void(uint04 step_index, AutomatedTestingDialog *dialog)> m_on_test
 The function executed on each loop step.
uint04 m_step_index = 0
 The current loop iteration index.
QTimer * m_test_timer
 The timer driving the loop iterations.

Additional Inherited Members

Public Attributes inherited from AutomatedTest
String icon
 The icon resource name displayed for this test.
bool is_looped_test = false
 Whether this test repeats in a loop until stopped.
TranslatedString name
 The user-facing translated name of the test.
std::function< void()> on_test_completed
 Callback invoked when the test finishes.

Detailed Description

A type of AutomatedTest that repeatedly loops until stopped by the user.


Definition at line 37 of file AutomatedTesting.h.

Constructor & Destructor Documentation

◆ LoopedAutomatedTest()

LoopedAutomatedTest::LoopedAutomatedTest ( const std::function< void(uint04 step_index, AutomatedTestingDialog *dialog)> & test_step)

Constructs a LoopedAutomatedTest with the given step function.

Parameters
[in]test_stepThe function called on each loop iteration with the step index and dialog.

Member Function Documentation

◆ performTest()

bool LoopedAutomatedTest::performTest ( AutomatedTestingDialog * dialog)
virtual

Starts the looped test, calling the step function repeatedly on a timer.

Parameters
[in]dialogThe testing dialog providing UI feedback and controls.
Returns
True if the test was started successfully.

Implements AutomatedTest.

◆ testStepIndex()

uint04 LoopedAutomatedTest::testStepIndex ( ) const
inline

Returns the current step index within the loop.

Returns
The current step index.

Definition at line 59 of file AutomatedTesting.h.

References m_step_index.


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