-
class
TestConductor
-
Interface to be used by tests for handling their execution.
Concept of an item that executes unit test according to
a well-defined semantics. A test conductor is handed a test
- or a test suite - so that it can run trough all
three phases of test: Fixture set-up, test execution and fixture tear-down.
Public Members:
-
virtual ~TestConductor () ;
-
Initialise a test conductor.
Does nothing.
-
virtual bool execute (Test&) ;
-
Execute the given test object.
The conductor first calls the set-up method of the given test.
If that fails, test execution and fixture tear-down are skipped. If setting up
the test fixture was successful, the test method is called. Regardless if that was
successful or not (an exception was thrown), the tear-down function of
the test is called. Any exceptions thrown by the tear-down function
have no further effects.
Note that a real test conductor does a lot
of other things while executing a test, like result collection and logging,
translating arbitrary application domain exception in test failures,
maintaining a user interface, etc. The method returns true if execution of the
test was successful, otherwise false.
-
virtual void skip (Test&) ;
-
Tell the conductor that this test was skipped.
Also when test are skipped (i.e. because a previous test failed in a test chain)
the conductor must be informed. That is necessary to be able to do bookkeeping, make
log entries or for notifying the GUI.
The Scrunitizer C++ Unit Test Framework
by Bernd Linowski
[Scrunitizer]
[Overview]
[Cookbook]
[Download]
[Index]
[Linosphere]
Page generated: 1 Nov 2000
(C) by Bernd Linowski
scrunitizer@linosphere.de
|