Index: tests/Makefile.am =================================================================== RCS file: /cvsroot/commoncpp/commoncpp2/tests/Makefile.am,v retrieving revision 1.9 diff -u -d -r1.9 Makefile.am --- tests/Makefile.am 8 Feb 2003 20:53:13 -0000 1.9 +++ tests/Makefile.am 30 Mar 2003 15:11:30 -0000 @@ -26,11 +26,11 @@ bug1 bug2 thread1 thread2 thread3 digest tcpstr1 url1 noinst_HEADERS = SampleObject.h SampleSubObject.h Test_Date.h Test_Digest.h \ - Test_Engine.h Test_SHATumbler.h Test_TCPStream.h Test_URLString.h + Test_Engine.h Test_Exception.h Test_SHATumbler.h Test_TCPStream.h Test_URLString.h if WITH_CPPUNIT_TESTS ccxx_tests_SOURCES = ccxx_tests.cpp SampleObject.cpp SampleSubObject.cpp \ - Test_Date.cpp Test_Engine.cpp Test_TCPStream.cpp Test_URLString.cpp + Test_Date.cpp Test_Engine.cpp Test_Exception.cpp Test_TCPStream.cpp Test_URLString.cpp # Test_Digest.cpp ccxx_tests_LDADD = ../src/libccext2.la $(XML_LIBS) $(Z_LIBS) $(LDADD) \ $(CPPUNIT_LIBS) Index: tests/README =================================================================== RCS file: /cvsroot/commoncpp/commoncpp2/tests/README,v retrieving revision 1.1.1.1 diff -u -d -r1.1.1.1 README --- tests/README 22 Feb 2002 10:12:21 -0000 1.1.1.1 +++ tests/README 30 Mar 2003 15:11:30 -0000 @@ -1,4 +1,45 @@ -Directory for hold automatic regression tests + Regression Tests +------------------ -After compiling launch test.sh for exec all automatic test together +This directory contains automatic regression tests. The structure for carrying +out these tests is currently under transition. There is a new, cpppunit-based +testsuite called ccxx_tests. And there are some other tests which have not yet +been integrated into the cppunit framework. + + Independent Tests +------------------- +A "make" command in this directory builds the independent tests, they can be +executed one after another by calling the shell script "test.sh". As stated +above, these tests should go away. + + + CPPUnit-based Tests +--------------------- + + Running +--------- + +To enable the building of this testsuite, you need the cppunit testing +framework (Available from http://cppunit.sf.net/). Secondly, you need to +enable the ccxx_test suite by calling the configure script with the parameter +"--with-cppunit": + +$ ./configure --with-cppunit [optional other parameters] + +A successive "make" should build the "ccxx_tests" executable. + + Development +------------- + +There is some old crc code in the main file of "ccxx_tests", called +"ccxx_tests.cpp". To add a new test for a particular class, create a new pair +of .h/.cpp files, called "Test_.h" resp. "Test_.cpp". + +Put your test suite in these files and register it using the factory framework +cppunit supplies.(A call to CPPUNIT_TEST_SUITE_REGISTRATION should be enough.) +I won't go into detail here about writing these test suites (As I'm also not +100% used to it yet :), but the cppunit documentation that may be found online +at the above URL is very comprehensive. + +Onno \ No newline at end of file