Qorus Integration Engine®  4.0.3_git
QorusInterfaceTest::QorusInterfaceTest Class Referenceabstract

Base class that exports functions for Qorus unit testing. For realworld examples see Introduction to the QorusInterfaceTest Module. More...

Inheritance diagram for QorusInterfaceTest::QorusInterfaceTest:
QUnit::Test QUnit::TestReporter QorusInterfaceTest::QorusJobTest QorusInterfaceTest::QorusServiceTest QorusInterfaceTest::QorusWorkflowTest QorusInterfaceTest::QorusPassiveWorkflowTest

Public Member Methods

 constructor (string name, string version, string desc, string rest_pfx, *reference p_argv, *hash< auto > opts)
 creates the object
 
private setUserPassword ()
 reimplement in child classes to allow the REST username & password for the Qorus server connection to be set before trying to communicate with the server More...
 
 globalSetUp ()
 checks that the interface exists and executes a StarLog action
 
auto exec (Action data)
 executes the Action by calling its run() method and returns the object of Action (that allows to retrieve some particular information about the action later in the test script) More...
 
string getQorusInstanceName ()
 tests whether some Qorus instance is running and returns its name More...
 
string getInstanceName ()
 returns the Qorus instance name More...
 
string getDescription ()
 returns a string describing the current interface being tested
 
date getTimestamp ()
 returns the test start timestamp
 
*hash< auto > getInterfaceInfo ()
 returns information about the interface from the REST API or NOTHING if the interface doesn't exist or the system is not responding on the HTTP interface
 
bool isInterfaceLoaded ()
 tests whether the current interface is loaded in the current Qorus instance More...
 
bool isInterfaceRunning ()
 tests whether the current interface is running in the current Qorus instance More...
 
hash< auto > getFunctionInfo (string name)
 returns the configuration (including source) for the named library function
 
hash< auto > getConstantInfo (string name)
 returns the configuration (including source) for the named library constant
 
hash< auto > getClassInfo (string name)
 returns the configuration (including source) for the named library class
 
 disable ()
 disables the current interface
 
 enable ()
 enables the current interface
 
abstract string getLogFileName ()
 returns the log file name for the current object
 
abstract bool canRun ()
 checks if the interface can run
 

Private Attributes

string m_rest_pfx
 a REST URI path prefix for the interface
 
string m_instance_name
 Qorus instance name.
 
string m_desc
 interface description
 
date m_timestamp = now_us()
 start timestamp
 

Detailed Description

Base class that exports functions for Qorus unit testing. For realworld examples see Introduction to the QorusInterfaceTest Module.

Member Function Documentation

◆ exec()

auto QorusInterfaceTest::QorusInterfaceTest::exec ( Action  data)

executes the Action by calling its run() method and returns the object of Action (that allows to retrieve some particular information about the action later in the test script)

Returns
the Action; typed as auto so that no cast<>() is needed to call local action methods on the result

◆ getInstanceName()

string QorusInterfaceTest::QorusInterfaceTest::getInstanceName ( )

returns the Qorus instance name

Returns
Qorus instance name

◆ getQorusInstanceName()

string QorusInterfaceTest::QorusInterfaceTest::getQorusInstanceName ( )

tests whether some Qorus instance is running and returns its name

Example:
t.getQorusInstanceName();

returns current Qorus instance name

◆ isInterfaceLoaded()

bool QorusInterfaceTest::QorusInterfaceTest::isInterfaceLoaded ( )

tests whether the current interface is loaded in the current Qorus instance

Example:
t.isInterfaceLoaded(info);
Returns
True if the interface is loaded, False if not

◆ isInterfaceRunning()

bool QorusInterfaceTest::QorusInterfaceTest::isInterfaceRunning ( )

tests whether the current interface is running in the current Qorus instance

Example:
bool b = t.isInterfaceRunning();
Returns
True if the interface is running, False if not

◆ setUserPassword()

private QorusInterfaceTest::QorusInterfaceTest::setUserPassword ( )

reimplement in child classes to allow the REST username & password for the Qorus server connection to be set before trying to communicate with the server

this base implementation does nothing


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