kbLogger 2.0.b1
The automotive ready test and logging program.
|
This class defines the API for the TestObject (to).
#include <configitemtestobject.h>
Public Slots | |
Test related functions. | |
Test * | createInvisibleTest (QString strTestName, QString strTestFunction, quint32 uTimeout=0, quint32 uRepeatCount=1) |
Creates an invisible Test to be linked in a real test. | |
Test * | createTest (QString strTestName, QString strTestFunction, quint32 uTimeout=0, quint32 uRepeatCount=1) |
Creates a Test. | |
Test * | createTest (Test *pParent, QString strTestName, QString strTestFunction, quint32 uTimeout=0, quint32 uRepeatCount=1) |
Creates a Test. | |
Test * | getRunningTest () |
Gets the currently running test. | |
Test * | getTest (int iIndex) |
Gets a visible test. | |
void | start () |
Starts the TestObject to run all configured tests. | |
void | stop () |
Stops the TestObject to cancel all running tests. | |
void | pause () |
Pauses the running test. | |
void | resume () |
Resumes the running test. | |
void | prepareRestart () |
Prepares a restart of the tests by clearing all results and test events. | |
void | generateHtmlReport () |
Generates a HTML TestReport. | |
quint32 | getRepeatCount () |
Retrieves the global repeat count. | |
quint32 | getRemainingCount () |
Retrieves the remaining global repeat count. | |
void | setRepeatCount (quint32 uRepeatCount) |
Sets the global repeat count. | |
QString | getProjectName () |
Retrieves the name of the project for which we are testing for. | |
void | setProjectName (QString strProjectName) |
Sets the name of the project for which we are testing for. | |
QString | getProjectInfo () |
Retrieves the additional info of the project for which we are testing for. | |
void | setProjectInfo (QString strProjectInfo) |
Sets the additional info of the project for which we are testing for. | |
QString | getTestName (int iTestIndex) |
Retrieves the name of the given test. | |
QString | getTestName () |
Retrieves the name of the test. | |
void | setTestName (QString strTestName) |
Sets the name of the test. | |
QString | getTestInfo () |
Retrieves the additional info of the test. | |
void | setTestInfo (QString strTestInfo) |
Sets the additional info of the test. | |
QString | getTestVersion () |
Retrieves the version of the test. | |
void | setTestVersion (QString strTestVersion) |
Sets the version of the test. | |
QString | getDutName () |
Retrieves the name of the DUT. | |
void | setDutName (QString strDutName) |
Sets the name of the DUT. | |
QString | getDutInfo () |
Retrieves the additional info of the DUT. | |
void | setDutInfo (QString strDutInfo) |
Sets the additional info of the DUT. | |
QString | getDutVersion () |
Retrieves the version of the DUT. | |
void | setDutVersion (QString strDutVersion) |
Sets the version of the DUT. | |
QString | getTesterName () |
Retrieves the name of the Tester. | |
void | setTesterName (QString strTesterName) |
Sets the name of the Tester. | |
DialogTestDialog * | createCustomDialog (Test *pTest, QString strHeader, QString strText="") |
Creates a custom TestDialog. | |
void | trace (QString strText) |
Send the text to the connected TraceViewer. | |
|
slot |
Creates a custom TestDialog
Example:
strHeader | The header text |
strText | The (main) text |
|
slot |
Creates an invisible test. This test is not shown in the TreeWidget in the ChildWindowTest.
Example:
strTestName | The name of the test. Must be unique. |
strTestFunction | The name of the function which implements the test. Must be programmed by the user. |
uTimeout | The timeout in ms. If the test is not set to passed nor failed, the test states changes automatically to failed when the timeout occurs. |
uRepeatCount | The repeat count of this test. The maximum runtime is uRepeatCount * uTimeout. The test fails if one of the runs has failed. |
|
slot |
Creates a test without a parent (means this will be a top level test).
Example:
strTestName | The name of the test. |
strTestFunction | The name of the function to call. |
uTimeout | The timeout in ms. If the test is not set to passed nor failed, the test states changes automatically to failed when the timeout occurs. |
uRepeatCount | The repeat count of this test. The maximum runtime is uRepeatCount * uTimeout. The test fails if one of the runs has failed. |
|
slot |
Creates a test with a parent.
Example:
pParent | A handle to the parent knot of this test. If 0, this test is a top level test. |
strTestName | The name of the test. |
strTestFunction | The name of the function to call. |
uTimeout | The timeout in ms. If the test is not set to passed nor failed, the test states changes automatically to failed when the timeout occurs. |
uRepeatCount | The repeat count of this test. The maximum runtime is uRepeatCount * uTimeout. The test fails if one of the runs has failed. |
|
slot |
Generates a HTML TestReport.
Call this in the testsFinished callback function.
Example:
|
slot |
Retrieves the additional info of the DUT.
|
slot |
Retrieves the name of the DUT.
|
slot |
Retrieves the version of the DUT.
|
slot |
Retrieves the additional info of the project for which we are testing for.
|
slot |
Retrieves the name of the project for which we are testing for.
|
slot |
Retrieves the remaining global repeat count.
Example:
|
slot |
Retrieves the global repeat count.
Example:
|
slot |
Gets the currently running test. This is useful if you need to decide passed or failed in the processMessage function.
Example:
|
slot |
Gets a visible test Every created test is stored in a list in order of their creation. This testIndex is used as parameter if the ConfigItemTest is calling the test function. This is useful to distinguish the test if they sharing the same test function. This happens implicitly, if you using the addLink function.
Example:
testIndex |
|
slot |
Retrieves the name of the tester.
Example:
|
slot |
Retrieves the additional info of the test.
|
slot |
Retrieves the name of the test.
|
slot |
Retrieves the name of the test.
iTestIndex | The index of the test of interest |
|
slot |
Retrieves the version of the test.
|
slot |
Pauses the TestObject to pause all running tests.
Pauses the TestObject to pause all running tests. The user can call that function from anywhere inside the script, triggered by any event.
Normally all test should run until they are finished or the user is using the tool bar buttons to pauses the tests.
Example:
|
slot |
|
slot |
Resumes the TestObject to resume all paused tests. The user can call that function from anywhere inside the script, triggered by any event.
Normally all test should run until they are finished or the user is using the tool bar buttons to pauses / resumes the tests.
Example:
|
slot |
Sets the additional info of the DUT.
strDutInfo | The additional DUT info |
|
slot |
Sets the name of the DUT.
strDutName | The name of the DUT |
|
slot |
Sets the version of the DUT.
strDutVersion | The version of the DUT |
|
slot |
Sets the additional info of the project for which we are testing for.
strProjectInfo | The project info |
|
slot |
Sets the name of the project for which we are testing for.
strProjectName | The project name |
|
slot |
Sets the global repeat count. If the repeat count is set to 0, it will be changed to 2^32-1 automatically.
Example:
uRepeatCount |
|
slot |
Sets the name of the tester.
Example:
strTesterName | The name of the tester |
|
slot |
Sets the additional info of the test.
strTestInfo | The test info |
|
slot |
Sets the name of the test.
strTestName | The name of the test |
|
slot |
Sets the version of the test.
strTestVersion | The test version |
|
slot |
|
slot |
Stops the TestObject to cancel all running tests. The user can call that function from anywhere inside the script, triggered by any event.
The easiest way to use it, is to place the call in the stop() function.
But anyway, normally all test should run until they are finished or the user is using the tool bar buttons to stop the tests.
Example: