CppUnit project page | FAQ |
Test plug-in interface.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. More...
#include <TestPlugIn.h>
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. | |
virtual | ~CppUnitTestPlugIn () |
Test plug-in interface.
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.
|
inlinevirtual |
|
pure virtual |
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().
|
pure virtual |
Provides a way for the plug-in to register some XmlOutputterHook.
|
pure virtual |
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.
|
pure virtual |
Gives a chance to the plug-in to remove its registered TestListener.
Override this method to remove a TestListener that has been added.
|
pure virtual |
Called when the XmlOutputter is destroyed.
Can be used to free some resources allocated by addXmlOutputterHooks().
Implemented in TestPlugInDefaultImpl.
|
pure virtual |
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.
Send comments to: CppUnit Developers |