Author: | Baptiste Lepilleur |
---|---|
Contact: | blep@users.sourceforge.net |
Currently, the framework has adopted CppUnit approach to driving testing. This means that the framework provides services for both TestDriver and TestRunner responsibility.
Since CppUnit is a testing framework, it should only provide the TestRunner for integration with Open Test.
Should at least include the following headers:
Provides a way to associate descriptive information to a test.
Warning: it should be designed/documented so that only the framework uses it to declare test.
Should also find a way to integrate this with test fixture declaration.
Just before test execution, test descriptive information should be merged with test configuration information (configuration information overriding test descriptive information if they share properties).
A mean should be provided to the user to access a read only copy of those data.
The user should be able to set test result information during the test run.
This can be used to add a line of log, set specific message, actual values, assertion location...
Provides a logging stream that associated logged data to the test.
Logged data should be sent to the TestDriver on each '\n'. This probably requires implementing a streambuffer.
This logging stream would be a singleton, like std::cout => CppUT::log.
Data written in the stream should be forwarded to the component managing TestInfo (TestRunner ?). This ensures that the correct threading strategy is used (one log per thread, one log for all thread...).
Checking assertions (opposed to aborting assertions) need to be added.
This should use the same mechanism as setCheckPointLocation():
The fail function checks the assertion type to determine if an assertion if thrown of is an assertion occurred.
It might also be interesting to see if removing Message is worth it. It could be replaced by direct update of the current assertion Properties.
A TestRunner wrapper application needs to be written for test plug-in support with Open test.
The wrapper application:
At the current time it is impossible to overload the equality check on older compiler without function template ordering support such as VC++ 6 (you must specialize the trait template)
The current implementation should be enhanced to detect if a specific overload is provided for comparison of AType and BType is provided, and automatically fallback on the generic == otherwise. This is similar to the convert to string trick used by stringize().
This would solve the overloading issue on older compiler without function template ordering support.