kbLogger 2.0.b1
The automotive ready test and logging program.
|
This class defines the API for the created tests.
#include <configitemtestobject.h>
Public Slots | |
Test related functions. | |
Test * | setActive (bool bActive) |
Activate or deactivates the test. | |
Test * | setBlockingMode (bool bBlockingMode) |
Activate or deactivates the blocking mode of the test. | |
Test * | setFaultTolerance (bool bFaultTolerant) |
Activate or deactivates the fault tolerant mode. | |
Test * | setChildFaultTolerance (bool bFaultTolerant) |
Activate or deactivates the child fault tolerant mode. | |
Test * | addLink (Test *pLinkTarget, QString strTestName) |
Add a link as a SubTest to this test. | |
Test * | getParent () |
Retrieves the parent test related to this test. | |
Test * | getChild (int testIndex) |
Retrieves the SubTest related to the current index (handle). | |
quint32 | getChildCount () |
Retrieves the count of SubTests of this test. | |
quint32 | getRepeatCount () |
Retrieves the RepeatCount. | |
quint32 | getRemainingCount () |
Retrieves to count of remaining test runs. | |
Test * | setRepeatCount (quint32 uRepeatCount) |
Set the RepeatCount of this test. | |
Test * | setRepeatCount (quint32 uRepeatCount, quint32 uRepeatDelay) |
Set the RepeatCount of this test. | |
Test * | setRetryCount (quint32 uRetryCount) |
Set the RetryCount of this test. | |
Test * | setRetryCount (quint32 uRetryCount, quint32 uRetrayDelay) |
Set the RetryCount of this test. | |
quint32 | getTimeout () |
Retrieves the timeout value of this test. | |
quint32 | getRemainingTime () |
Retrieves the remaining time until the timeout occurs. | |
Test * | setTimeout (quint32 uTimeout) |
Sets the timeout. | |
int | getState () |
Retrieves the state of the test. | |
QString | getTestName () |
Retrieves the name of the test. | |
QString | getTestInfo () |
Retrieves the TestInfo. | |
Test * | setTestInfo (QString strTestInfo) |
Sets the TestInfo. | |
QString | getCallback () |
Retrieves the test callback. | |
Test * | setCallback (QString strTestCallback) |
Sets the test callback. | |
QString | getFunction () |
Retrieves the test function. | |
Test * | setFunction (QString strTestFunction) |
Sets the test function. | |
TestCondition * | createCondition (quint32 uTimeout, QString strConditionName) |
Adds a condition to this test. | |
TestCondition * | createCondition (quint32 uTimeout, QString strConditionName, QString strRegExpPassed, QString strRegExpFailed="") |
Adds a condition to this test. | |
TestCondition * | createDelay (quint32 uTimeout, QString strConditionName, QString strRegExpDelay) |
Adds a delay condition to this test. | |
TestCondition * | createWatchDog (quint32 uTimeout, QString strConditionName, QString strRegExpWatchDog) |
Adds a watchdog condition to this test. | |
TestCondition * | getCondition (QString strConditionName) |
Retrieves the condition of this test which is related to the condition name. | |
TestCondition * | getCondition (int iConditionIndex) |
Retrieves the condition of this test which is related to the condition index. | |
QVariant | getParameter (QString strParameter) |
Retrieves the value of the given parameter. | |
Test * | setParameter (QString strParameter, QVariant vValue) |
Stores the given value as parameter. | |
void | passed (QString strPassed) |
Sets the test state to passed. | |
void | failed (QString strFailed) |
Sets the test state to failed. | |
quint32 | getTime () |
Retrieves the runtime of the TestCondition. | |
void | storeMarker (QString strText) |
Stores a marker in the list of test events. | |
void | storeFileMarker (QString strText, QString strFile) |
Stores a file marker in the list of test events. | |
Add a link as a SubTest to this test. With this function, an existing test can be used in multiple parent tests.
Example:
pLinkTarget | A reference to the link target. |
strTestName | The new name under which the link target occurs as SubTest below the test. |
|
slot |
Adds a condition to this test.
Example:
uTimeout | |
strCondName |
|
slot |
Adds a condition to this test.
Example:
uTimeout | |
strConditionName | |
strRegExpPassed | |
strRegExpFailed |
|
slot |
Adds a delay condition to this test.
Example:
uTimeout | |
strConditionName | |
strRegExpDelay |
|
slot |
Adds a watchdog condition to this test.
Example:
uTimeout | |
strConditionName | |
strRegExpWatchDog |
|
slot |
Sets the test state to failed.
Example:
strFailed | The is text is shown in the test report when the test run is finished. |
|
slot |
Retrieves the TestCallback.
The test callback is called, if the test changes its state to PASSED, FAILED or TIMEOUT.
|
slot |
Retrieves the SubTest related to the current index (handle).
Example:
iChildIndex | The child index in the list of SubTests. |
|
slot |
Retrieves the count of SubTests of this test.
Example:
|
slot |
Retrieves the condition of this test which is related to the condition index.
iConditionIndex |
|
slot |
Retrieves the condition of this test which is related to the condition name.
strConditionName |
|
slot |
Retrieves the TestFunction.
The test function is called, if the test changes its state to RUN.
|
slot |
Retrieves the value of the given parameter.
Example:
strParameter | The name of the parameter |
|
slot |
Retrieves the parent test related to this test.
Example:
|
slot |
Retrieves to count of remaining test runs.
Example:
|
slot |
Retrieves the remaining time until the timeout occurs.
Example:
|
slot |
Retrieves the RepeatCount of this test.
Example:
|
slot |
Retrieves the state of the test.
Possible values are: TEST_INACTIVE = 0, TEST_ACTIVE = 1, TEST_RUNNING = 2, TEST_PAUSED = 3, TEST_PASSED = 4, TEST_FAILED = 5, TEST_DELAYED = 6, TEST_TIMEOUT = 7, TEST_CANCELED = 8, TEST_CANCELEDBYPARENT = 9, TEST_ERROR = 10
Example:
|
slot |
Retrieves the TestInfo.
The test information are useful to store some informations about the background of the test. This information is not influencing anything of the test itself.
|
slot |
Retrieves the TestName.
Example:
|
slot |
Retrieves the runtime of the Test.
|
slot |
Retrieves the timeout value of this test.
Example:
|
slot |
Sets the test state to passed.
Example:
strPassed | The is text is shown in the test report when the test run is finished. |
|
slot |
Activate or deactivates the test. Since the default activity state is true, it is not necessary to set this to true in the script. If you want to switch off a test and prevent that test from running in the test run, call this function with parameter bActivate=false.
Example:
bActive | Set to true to activate the test, otherwise set it to false. |
|
slot |
Activate or deactivates the blocking mode of the test. That means, if true, the parent test will wait starting the next child test until this test has finished. Example:
bBlockingMode | Set to true, if the test shall running in blocking mode (default). |
|
slot |
Sets the TestCallback.
The test callback is called, if the test changes its state to PASSED, FAILED or TIMEOUT. Example:
strTestCallback |
|
slot |
Sets the child fault tolerance of the test. That means, if true, the test is continuing the next child test, in case a child test is failing. If false, the test is changing it's state to failed and informs its parent.
Example:
bFaultTolerant | Set to true, if the Test shall be tolerant to children faults. |
|
slot |
Sets the fault tolerance of the test. That means, if true, the test state is not influencing its parent state. If false, the test is changing it's state to failed and informs its parent.
Example:
bFaultTolerant | Set to true, if the Test shall be fault tolerant. |
|
slot |
Sets the TestFunction.
The test function is called, if the test changes its state to RUN. Example:
strTestFunction |
|
slot |
Stores the given value as parameter.
Example:
strParameter | The name of the parameter |
vValue | The value of the parameter |
|
slot |
Set the RepeatCount of this test.
Example:
uRepeatCount |
|
slot |
Set the RepeatCount of this test.
Example:
uRepeatCount | |
uRepeatDelay | in ms. |
|
slot |
Set the RetryCount of this test. If not called, the RetryCount is 0. Which means the test is running only once.
Example:
uRetryCount |
|
slot |
Set the RetryCount of this test. If not called, the RetryCount is 0. Which means the test is running only once.
Example:
uRetryCount | |
uRetryDelay | in ms. |
|
slot |
Sets the TestInfo.
The test information are useful to store some informations about the background of the test. This information is not influencing anything of the test itself.
strTestInfo |
|
slot |
Sets the timeout.
Example:
uTimeout |
|
slot |
Stores a file marker in the list of test events.
The file is copied into the test result folder and the marker will also be visible in the generated HTML report as a link to the file.
strText | The user defined text for that marker. |
strFile | The full qualified file name. |
|
slot |
Stores a marker in the list of test events.
The marker will also be visible in the generated HTML report.
strText | The user defined text for that marker. |