CppUnit project page | FAQ | CppUnit home page |
#include <TestPlugIn.h>
Inheritance diagram for CppUnitTestPlugIn:
Public Member Functions | |
virtual void | initialize (CPPUNIT_NS::TestFactoryRegistry *registry, const CPPUNIT_NS::PlugInParameters ¶meters)=0 |
Called just after loading the dynamic library. | |
virtual void | addListener (CPPUNIT_NS::TestResult *eventManager)=0 |
Gives a chance to the plug-in to register TestListener. | |
virtual void | removeListener (CPPUNIT_NS::TestResult *eventManager)=0 |
Gives a chance to the plug-in to remove its registered TestListener. | |
virtual void | addXmlOutputterHooks (CPPUNIT_NS::XmlOutputter *outputter)=0 |
Provides a way for the plug-in to register some XmlOutputterHook. | |
virtual void | removeXmlOutputterHooks ()=0 |
Called when the XmlOutputter is destroyed. | |
virtual void | uninitialize (CPPUNIT_NS::TestFactoryRegistry *registry)=0 |
Called just before unloading the dynamic library. |
This class define the interface implemented by test plug-in. A pointer to that interface is returned by the function exported by the test plug-in.
Plug-in are loaded/unloaded by PlugInManager. When a plug-in is loaded, initialize() is called. Before unloading the plug-in, the PlugInManager call uninitialize().
addListener() and removeListener() are called respectively before and after the test run.
addXmlOutputterHooks() and removeXmlOutputterHooks() are called respectively before and after writing the XML output using a XmlOutputter.
CppUnit::TestPlugInDefaultImpl, CppUnit::XmlOutputter.
|
Gives a chance to the plug-in to register TestListener. Override this method to add a TestListener for the test run. This is useful if you are writing a custom TestListener, but also if you need to setUp some global resource: listen to TestListener::startTestRun(), and TestListener::endTestRun(). |
|
Provides a way for the plug-in to register some XmlOutputterHook.
|
|
Called just after loading the dynamic library. Override this method to add additional suite to the registry, though this is preferably done using the macros (CPPUNIT_TEST_SUITE_REGISTRATION...). If you are creating a custom listener to extends the plug-in runner, you can use this to configure the listener using the parameters. You could also use the parameters to specify some global parameter, such as test datas location, database name... N.B.: Parameters interface is not define yet, and the plug-in runner does not yet support plug-in parameter. |
|
Gives a chance to the plug-in to remove its registered TestListener. Override this method to remove a TestListener that has been added. |
|
Called when the XmlOutputter is destroyed. Can be used to free some resources allocated by addXmlOutputterHooks(). Implemented in TestPlugInDefaultImpl. |
|
Called just before unloading the dynamic library. Override this method to unregister test factory added in initialize(). This is necessary to keep the TestFactoryRegistry 'clean'. When the plug-in is unloaded from memory, the TestFactoryRegistry will hold reference on test that are no longer available if they are not unregistered. |
hosts this site. |
Send comments to: CppUnit Developers |