Version 8.0.1 |
Once registered with the current run context via rc.addTestRunListener
, an
implementation of the TestRunListener
interface will get notified whenever
test execution enters or exits a node and when a problem occurs. An illustrative example
is provided in the test suite TestRunListener.qft
, located in the directory
demo/runlistener
in your QF-Test installation. Best deactivate the debugger
before running the whole test suite.
Note A variant of the TestRunListener
interface called
DaemonTestRunLister
can be used to monitor a test run remotely via the
daemon API. It is described in subsection 54.2.5.
The run listener API consists of the following classes:
TestRunListener
interface
The interface de.qfs.apps.qftest.extensions.qftest.TestRunListener
has
to be implemented and registered with a run context via
rc.addTestRunListener()
.
Note
To implement the interface you can also derive from the class
de.qfs.apps.qftest.extensions.qftest.AbstractTestRunListener
which provides empty implementations of all methods so you only need to implement
those methods you are interested in.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
TestRunEvent
The class de.qfs.apps.qftest.extensions.qftest.TestRunEvent
holds
information about the currently executed nodes and the current error state. It defines
the following constants for execution states and error levels:
STATE_NOT_IMPLEMENTED
, STATE_SKIPPED
, STATE_OK
,
STATE_WARNING
, STATE_ERROR
and STATE_EXCEPTION
.
The first two states apply only to 'Test set' and 'Test case' nodes.
In the runStopped
method you can also check whether
the test run has been interrupted or completed normally. Therefore
the constants
STATE_RUN_INTERRUPTED
and
STATE_RUN_TERMINATED
are defined.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
TestSuiteNode
A de.qfs.apps.qftest.extensions.qftest.TestSuiteNode
is a representation
of a QF-Test node that is currently being executed, including information about the type
of node, its name, comment, etc.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Last update: 9/10/2024 Copyright © 1999-2024 Quality First Software GmbH |