cppunit-devel Mailing List for CppUnit - C++ port of JUnit (Page 41)
Brought to you by:
blep
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
(21) |
May
(96) |
Jun
(109) |
Jul
(42) |
Aug
(6) |
Sep
(106) |
Oct
(60) |
Nov
(20) |
Dec
(6) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(7) |
Feb
(11) |
Mar
(49) |
Apr
(124) |
May
(30) |
Jun
(37) |
Jul
(53) |
Aug
(33) |
Sep
(21) |
Oct
(22) |
Nov
(19) |
Dec
(15) |
2003 |
Jan
(34) |
Feb
(25) |
Mar
(11) |
Apr
(12) |
May
(16) |
Jun
(24) |
Jul
(23) |
Aug
(23) |
Sep
(42) |
Oct
(7) |
Nov
(32) |
Dec
(33) |
2004 |
Jan
(41) |
Feb
(41) |
Mar
(24) |
Apr
(25) |
May
(18) |
Jun
(13) |
Jul
(11) |
Aug
(15) |
Sep
(22) |
Oct
(10) |
Nov
(15) |
Dec
(9) |
2005 |
Jan
(4) |
Feb
(15) |
Mar
(11) |
Apr
(16) |
May
(29) |
Jun
(17) |
Jul
(27) |
Aug
(12) |
Sep
(9) |
Oct
(10) |
Nov
(5) |
Dec
(6) |
2006 |
Jan
(2) |
Feb
(6) |
Mar
(7) |
Apr
(2) |
May
(1) |
Jun
(5) |
Jul
(8) |
Aug
(6) |
Sep
(10) |
Oct
(11) |
Nov
(15) |
Dec
(2) |
2007 |
Jan
(12) |
Feb
(22) |
Mar
(10) |
Apr
(7) |
May
(1) |
Jun
(8) |
Jul
(4) |
Aug
(1) |
Sep
(2) |
Oct
(1) |
Nov
|
Dec
|
2008 |
Jan
|
Feb
(7) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(7) |
Dec
|
2010 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Steve M. R. <ste...@vi...> - 2002-04-10 12:45:45
|
Hi, I haven't any real opinion on adding regular expression matching to CppUnit. I presume one could always call their own favourite regex matcher wrapped up in CPPUNIT_ASSERT without too much trouble. However, since you mentioned the BOOST libraries, I wonder if you have looked at their implementations of concept checking and testing? The web page (www.boost.org) indicates that there is not yet any unit test library. The BOOST code is pretty well designed and the mailing list is full of very bright people. So it would be a boon to have CppUnit involved with them. I haven't looked at any of this stuff, myself. Has anyone else? -Steve -- by Rocket to the Moon, by Airplane to the Rocket, by Taxi to the Airport, by Frontdoor to the Taxi, by throwing back the blanket and laying down the legs ... - They Might Be Giants |
From: durai <dur...@na...> - 2002-04-10 08:31:28
|
Hi! I'm quit new for Cppunit. can u give any book referece and sites for Cppunit. Raju. |
From: Volker B. <vbo...@te...> - 2002-04-10 07:05:22
|
Hi, for quite a while now it has been a plan of mine to add some sort of regular expression support to cppunit. Whenever it gets to comparing strings it would often help to use regular expressions instead of exact string match. Often dynamic information is the problem. An example: I want to check the output of a logging server. Every message should have this format: <msg. sequence no.> <process id> <date> <time> <message> e.g. 2 15337 2002-04-05 09:44 server started With current cppunit I use shell scripts to check the output. With regular expressions it would be much easier, e.g. CPPUNIT_ASSERT_REGEX_MATCH("^\d+ \d+ 20\d{2}-\d{2}-\d{2}" "\d{2}:\d{2} server started", logline); (with perl style \d :=3D [0-9]). But there might be some issues with using regular expressions in C++: - Although regular expression handling is part of the POSIX standard I don't know how portable it is. - The regex interface is somewhat more complicated than a simple string equality. There are a lot of switches and options controlling the type of match. But it should be *really simple* to use in cppunit. - There are some concurring regex implementation. On Debian Linux e.g. there are at least 5: glibc (libc/POSIX), libregex (GNU), libregexx (C++ wrapper for libregex), libboost (C++, maintained by well known Steve M. Robbins...), libpcre (perl style regex) I think, we should have at least one simple regex-assert, at least on some platforms that supports regexps. Perhaps we could have a requirement like this 'if you want to use regexps with cppunit you have to install libXXX otherwise they will be disabled' (the way cppunit deals with doxygen). I think this has some advantages: - One could use the 'best suited' library, e.g. a C++-library. - There might be less portability issues. Comments? Are there even any existing implementations of regex-asserts already? Best regards, Volker (BTW. regexps are still less than one could think of: In the example above there is no way to ensure that the timestamp is a valid date...) --=20 Volker Boerchers <vbo...@te...> System Engineer TECON Systems AG, Perlengraben 2, 50676 K=F6ln, http://www.tecon.de Tel: +49-221-92007-55, Fax: +49-221-92007-77 |
From: Steve M. R. <ste...@vi...> - 2002-04-06 18:12:21
|
On Sat, Apr 06, 2002 at 12:13:56AM +0200, Baptiste Lepilleur wrote: > > Baptiste: which of the files in include/cppunitui are being used? > > They need to be installed. Why aren't they in the include/cppunit > > hierarchy? > > All. Actually, before the last release, the only file present in cppunitui > where for the qt test runner (not VC++ specific). Ah. OK, but I don't think the qt test runner was being built on unix, so I really meant "not unix" when I said "VC++ specific". > I moved all the test > runners in directory cppunitui in release 1.7.10. > > This was part of the directory structure we talked about a very long time > ago (never rely concluded that discussion, though Bastian more or less > agreed upon it at the time). > > If you think it's better to have only one include directory, we can still > make the change without much trouble (massive search&replace in doc & > source). This change is a week old... I prefer it. I conceed that it is an aesthetic decision, but it is one more in keeping with packages that install into system locations -- one generally puts everything inside a single hierarchy. -S -- by Rocket to the Moon, by Airplane to the Rocket, by Taxi to the Airport, by Frontdoor to the Taxi, by throwing back the blanket and laying down the legs ... - They Might Be Giants |
From: Baptiste L. <gai...@fr...> - 2002-04-05 22:08:59
|
----- Original Message ----- From: "Steve M. Robbins" <ste...@vi...> To: "Robert Wenner" <ro...@po...> Cc: <cpp...@li...> Sent: Friday, April 05, 2002 3:48 PM Subject: Re: [Cppunit-devel] CppUnit 1.7.10 tar ball > On Wed, Apr 03, 2002 at 01:32:05PM +0200, Robert Wenner wrote: [...] > > On using the deprecated TextTestRunner.h the preprocessor could not find > > the include file, I changed in include/cppunit/TextTestRunner.h this > > line > > #include <cppunitui/text/TestRunner.h> > > to > > #include <../cppunitui/text/TestRunner.h> > > This isn't the right change. > > The right thing to do is install the includes. > > Baptiste: which of the files in include/cppunitui are being used? > They need to be installed. Why aren't they in the include/cppunit > hierarchy? All. Actually, before the last release, the only file present in cppunitui where for the qt test runner (not VC++ specific). I moved all the test runners in directory cppunitui in release 1.7.10. This was part of the directory structure we talked about a very long time ago (never rely concluded that discussion, though Bastian more or less agreed upon it at the time). If you think it's better to have only one include directory, we can still make the change without much trouble (massive search&replace in doc & source). This change is a week old... > > Documentation is somewhat better now. :-) > > Err, how is the above related to documentation? Not related I believe... Baptiste. |
From: Steve M. R. <ste...@vi...> - 2002-04-05 13:57:52
|
On Thu, Apr 04, 2002 at 05:42:10PM +0200, Baptiste Lepilleur wrote: > > And later: > > $ make install > > [...] > > /usr/bin/install: cannot create regular file > > `/usr/local/share/cppunit/html/html/index.html': No such file or > > directory > > make[2]: *** [install-htmlDATA] Error 1 > > That's one "html" too much? > > You may not have installed doxygen (the documentation generator). If doxygen is not installed, then no docs are built nor installed. > Though, that is kind of weird since we provide the > generated documentation in a separate bundle. That lead me to beleive this > would be a bug in the makefile (don't know how to fix that one). Which is a bug? That we provide docs in a separate bundle? That was a deliberate decision, as I recall. It allows you to cater both to the folks who HAVE doxygen and the folks that DON'T. If you put the docs inside the sources, then the former complain about bloat, and if you don't include docs anywhere, then the latter group loses. > > On using the deprecated TextTestRunner.h the preprocessor could not find > > the include file, I changed in include/cppunit/TextTestRunner.h this > > line > > #include <cppunitui/text/TestRunner.h> > > to > > #include <../cppunitui/text/TestRunner.h> > > Hum, something is wrong there. The include hierarchy is supposed to be like > this: > > include/ > cppunit/ > TextTestRunner.h > cppunitui/ > text/ > TestRunner.h The problem may lie in the fact that none of the cppunitui headers get installed. You won't notice this problem as you work from the source dir. The last time I looked at this, the only stuff in cppunitui was for MSVC++, so I didn't make install rules. But that seems to have changed. Anything that is generally useful ought to get installed. However, it would be truly obnoxious to create both /usr/include/cppunit and /usr/include/cppunitui Why isn't the latter stuff inside include/cppunit/ui ? -S -- by Rocket to the Moon, by Airplane to the Rocket, by Taxi to the Airport, by Frontdoor to the Taxi, by throwing back the blanket and laying down the legs ... - They Might Be Giants |
From: Steve M. R. <ste...@vi...> - 2002-04-05 13:48:41
|
On Wed, Apr 03, 2002 at 01:32:05PM +0200, Robert Wenner wrote: > Hi! > > Seems to be almost fine under Linux for me, too. > > During installation I get these messages: > $ autoconf > You should update your `aclocal.m4' by running aclocal. The tarball should have non-developer makefiles, and you do not need to run the autotools yourself. If you are going to run the autotools yourself, then it is up to you to know how to proceed. In this case, run "aclocal -I config" before "autoconf". > And later: > $ make install > [...] > /usr/bin/install: cannot create regular file > `/usr/local/share/cppunit/html/html/index.html': No such file or > directory > make[2]: *** [install-htmlDATA] Error 1 > That's one "html" too much? Indeed. However, I can't reproduce it, and you did not report all the output, so it is hard to guess what happened. Please do the following. Download the tarball, unpack into a pristine directory. DO NOT RUN THE AUTOTOOLS. Just run: ./configure --prefix=/tmp/testing cd doc make 2>&1 | tee make.log make install 2>&1 | tee install.log If you get any errors or warnings in those last two steps, send me the associated log file. > On using the deprecated TextTestRunner.h the preprocessor could not find > the include file, I changed in include/cppunit/TextTestRunner.h this > line > #include <cppunitui/text/TestRunner.h> > to > #include <../cppunitui/text/TestRunner.h> This isn't the right change. The right thing to do is install the includes. Baptiste: which of the files in include/cppunitui are being used? They need to be installed. Why aren't they in the include/cppunit hierarchy? > Documentation is somewhat better now. :-) Err, how is the above related to documentation? -S -- by Rocket to the Moon, by Airplane to the Rocket, by Taxi to the Airport, by Frontdoor to the Taxi, by throwing back the blanket and laying down the legs ... - They Might Be Giants |
From: Steve M. R. <ste...@vi...> - 2002-04-05 13:26:26
|
On Wed, Apr 03, 2002 at 11:20:36AM +0200, Baptiste Lepilleur wrote: > Thanks. At least the major no go of the previous release as been resolved. > > Indeed, it's strange that doxygen is invoked by 'make check'. Though, I > don't have the first as to were that make rule is defined. The docs are generated for make target "all" (the default if you type just "make"). Since "check" depends on "all" (it must since you need the libs built in order to check them), then running simply "make check" will first invoke all the rules for "make all", which includes doxygen-generated docs. If that bothers you, you can choose to NOT build the documentation using ./configure --disable-doxygen ... See ./configure --help for a full list of optional features. -S -- by Rocket to the Moon, by Airplane to the Rocket, by Taxi to the Airport, by Frontdoor to the Taxi, by throwing back the blanket and laying down the legs ... - They Might Be Giants |
From: Baptiste L. <gai...@fr...> - 2002-04-05 12:53:49
|
----- Original Message ----- From: "Robert Wenner" <ro...@po...> To: "Baptiste Lepilleur" <gai...@fr...>; <cpp...@li...> Sent: Friday, April 05, 2002 8:12 AM Subject: Re: [Cppunit-devel] CppUnit 1.7.10 tar ball > Hi Baptiste, > > excuse me for sending directly to you (and the list) but I'm not sure > if I can post to the list again. > > On Thursday 04 April 2002 17:42, Baptiste Lepilleur wrote: > > > /usr/bin/install: cannot create regular file > > > `/usr/local/share/cppunit/html/html/index.html': No such file or > > > directory > > > make[2]: *** [install-htmlDATA] Error 1 > > > That's one "html" too much? > > > > You may not have installed doxygen (the documentation generator). > I do have Oxygen installed. > I think, the path is wrong, should be > usr/local/share/cppunit/html/index.html > but is > usr/local/share/cppunit/html/html/index.html Does the file usr/local/share/cppunit/html/index.html exists ? If I remember, I think cppunit/html is the root for generated docs, and contains a subdirectory for each format (rtf, html, latex...) > > > Could you check that include/ is the directory you give to the > > compiler ? > I use the -I/home/robert/cppunit/include/cppunit switch. > All other include files work well. It should definitively be -I/home/robert/cppunit/include/. How it works is beyond me. > > > [TextTestRunner] > > I'll probably fix that after 1.8.0. I think I'll introduce a > > CppUnit::TestRunner class which does not use any outputter, but > > create a default TestResult and give access to the TestResult. run() > > would run the specified test and that's it. > I already made two changes to TestRunner: > 1) It does not make any output or pausing; > 2) In the findTestByName method it scans only the top level suites. I > added code to do a recursive search descending to all suites to find a > test or a suite by the given name; > > I attatched the diff of the original file and my modified version if > someone's interested in it. Yuups, that's pretty much what I was talking about. Please notes that dynamic_cast<> is not allowed in cppunit core lib (not portable enough it seems). Deep hierarchy exploration and findTestByName() will be done in a portable way adding a more composite like interface to class Test: class Test { [...] virtual int getChildTestCount() const; virtual Test *getChildTest( int index ) const; virtual Test *findTestByName( const std::string &testName ) const; } Default implementation will be provided for 'leaf' (no child test). But I want to get 1.8.0 out before I tackle this (there's already far too much new features in that release). Baptiste. > > Robert > |
From: Baptiste L. <gai...@fr...> - 2002-04-05 12:53:49
|
This is a "development" release. This is done to attemp removing the most important "bug" from the public release. It might not even compile (that's what happen to 1.7.8, some file where forgotten in some Makefile.am and did not make it to the dist). The distribution was generated from a CVS snapshot. It is hosted on my web site because it's more convenient for me (from France, sourceforge is kind of slow and sometime break the connection...) Baptiste. ----- Original Message ----- From: "Duane Murphy" <dua...@ma...> To: "Baptiste Lepilleur" <gai...@fr...>; "CppUnit Developers" <cpp...@li...> Sent: Thursday, April 04, 2002 8:50 PM Subject: Re: [Cppunit-devel] CppUnit 1.7.10 tar ball > The sourceforge web site for cppunit still shows 1.6.2 as the latest > release. What is the relationship between this release and the official > sourceforge site? > > ...Duane > > --- At Tue, 2 Apr 2002 14:37:56 +0200, Baptiste Lepilleur wrote: > > > The tar ball are available at the following location: > > > >http://gaiacrtn.free.fr/cppunit/cppunit-1.7.10.tar.gz > >http://gaiacrtn.free.fr/cppunit/cppunit-docs-1.7.10.tar.gz > > > > The problem on Unix should have been fixed. > > Let me know how it goes. > > If no major issue is raised by the end of the week, it's a go for 1.8.0. > > > >New in CppUnit 1.7.10: > >---------------------- > > > >In short: > >- new assertions > >- new facilities to write custom assertions > >- new macros to define test case in your fixture > >- registration of test fixture in named suite > >- xml & compiler format test result output > >- a new graphic test runner for the QT library > >- MFC test runner window is resizable > >- cppunit as a DLL > >- Unicode support for MFC test runner. > >- architecture clean-up: TestResultCollector extracted from TestResult. > >* architecture clean-up: TestFixture extracted from TestCase. > >* cookbook and documentation updated. > > > >(*) => change since 1.7.8 > > > >Baptiste. |
From: Volker B. <vbo...@te...> - 2002-04-05 08:16:47
|
On Thu, 4 Apr 2002, Baptiste Lepilleur wrote: > From: "Robert Wenner" <ro...@po...> > > > > Latest version seems to be almost fine under Linux for me, too. > > > > During installation I get these messages: > > $ autoconf > > You should update your `aclocal.m4' by running aclocal. >=20 >=20 > Don't know anything about that. Somebody does ? running autoconf is part of building the distribution, i.e. something that is not part of the regular installation process. But if you actually want to rebuild the configure script you should follow the procedure from the autogen.sh script (that is intentionally *not* included in the distribution, as we learned :-)) There is a (very small) propability that some failure in autoconf leads to some problem you described later. > > And later: > > $ make install > > [...] > > /usr/bin/install: cannot create regular file > > `/usr/local/share/cppunit/html/html/index.html': No such file or > > directory > > make[2]: *** [install-htmlDATA] Error 1 > > That's one "html" too much? >=20 > You may not have installed doxygen (the documentation generator). It can = be > found at: > http://www.doxygen.org/. Though, that is kind of weird since we provide t= he > generated documentation in a separate bundle. That lead me to beleive thi= s > would be a bug in the makefile (don't know how to fix that one). I have doxygen installed. The make install of the html files works for me. I also checked that configure --disable-doxygen actually disabled generation and installation of html (at least this should help in your case). You might want to check the file config.log for the doxygen stuff in configuration. Regards Volker --=20 Volker Boerchers <vbo...@te...> System Engineer TECON Systems AG, Perlengraben 2, 50676 K=F6ln, http://www.tecon.de Tel: +49-221-92007-55, Fax: +49-221-92007-77 |
From: Duane M. <dua...@ma...> - 2002-04-04 18:50:50
|
The sourceforge web site for cppunit still shows 1.6.2 as the latest release. What is the relationship between this release and the official sourceforge site? ...Duane --- At Tue, 2 Apr 2002 14:37:56 +0200, Baptiste Lepilleur wrote: > The tar ball are available at the following location: > >http://gaiacrtn.free.fr/cppunit/cppunit-1.7.10.tar.gz >http://gaiacrtn.free.fr/cppunit/cppunit-docs-1.7.10.tar.gz > > The problem on Unix should have been fixed. > Let me know how it goes. > If no major issue is raised by the end of the week, it's a go for 1.8.0. > >New in CppUnit 1.7.10: >---------------------- > >In short: >- new assertions >- new facilities to write custom assertions >- new macros to define test case in your fixture >- registration of test fixture in named suite >- xml & compiler format test result output >- a new graphic test runner for the QT library >- MFC test runner window is resizable >- cppunit as a DLL >- Unicode support for MFC test runner. >- architecture clean-up: TestResultCollector extracted from TestResult. >* architecture clean-up: TestFixture extracted from TestCase. >* cookbook and documentation updated. > >(*) => change since 1.7.8 > >Baptiste. >--- >Baptiste Lepilleur <gai...@fr...> >http://gaiacrtn.free.fr/ > > > >_______________________________________________ >Cppunit-devel mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppunit-devel ...Duane -- "If tyranny and oppression come to this land, it will be in the guise of fighting a foreign enemy." - James Madison |
From: Ravi D. <Rav...@va...> - 2002-04-04 16:54:00
|
Hello, I am attaching a sample ant file that I have ... I have written custom ant tasks MsDevExec and CppUnit that wrap exec ant task .. I am a novice c++ programmer .... I have been working in Java for the last 4 years ... Can u mail me a complete code sample for the example that you gave below .. Thanks Ravi -----Original Message----- From: Pedro Ferreira [mailto:ped...@in...] Sent: Thursday, April 04, 2002 4:55 AM To: 'Ravi Dodla'; cpp...@li... Subject: RE: [Cppunit-devel] Unit Test Results in xml and Ant Integration Hi Ravi, > I am trying to setup Continuous Integration with Ant and > Cruise Control for a C++ project .. Did you find it difficult to set up Ant in a C++ environment? Could you be so kind as to send me one or two example Ant files or point me to some examples? > Is there a convinient way to run cppunit test suites and get > the results in a xml format ... Something like this should work: TestResult result; Test* test = ... test -> run (&result); ofstream output ("tests.xml"); XmlOutputter outputter (&result, output); outputter.write (); output.close (); HTH and TIA, Pedro |
From: Baptiste L. <gai...@fr...> - 2002-04-04 15:38:34
|
----- Original Message ----- From: "Robert Wenner" <ro...@po...> To: "Baptiste Lepilleur" <gai...@fr...> Sent: Thursday, April 04, 2002 12:56 PM Subject: Re: [Cppunit-devel] CppUnit 1.7.10 tar ball > Hi! > > Sorry if you get this email more than once, it was returned yesterday > because it could not be delivered for 4 hours. There seems to be a > problem with my mail going to the list. > > --- cut here --- > > Latest version seems to be almost fine under Linux for me, too. > > During installation I get these messages: > $ autoconf > You should update your `aclocal.m4' by running aclocal. Don't know anything about that. Somebody does ? > And later: > $ make install > [...] > /usr/bin/install: cannot create regular file > `/usr/local/share/cppunit/html/html/index.html': No such file or > directory > make[2]: *** [install-htmlDATA] Error 1 > That's one "html" too much? You may not have installed doxygen (the documentation generator). It can be found at: http://www.doxygen.org/. Though, that is kind of weird since we provide the generated documentation in a separate bundle. That lead me to beleive this would be a bug in the makefile (don't know how to fix that one). > > On using the deprecated TextTestRunner.h the preprocessor could not find > the include file, I changed in include/cppunit/TextTestRunner.h this > line > #include <cppunitui/text/TestRunner.h> > to > #include <../cppunitui/text/TestRunner.h> Hum, something is wrong there. The include hierarchy is supposed to be like this: include/ cppunit/ TextTestRunner.h cppunitui/ text/ TestRunner.h Since include/ is the directory given to the compiler to search include, it should be resolved successfully (and was on VC++ before I mad the update in the examples). Could you check that include/ is the directory you give to the compiler ? An acceptable fix would be: #include "../cppunitui/text/TestRunner.h" => the include is relative to the locate of TextTestRunner.h file, while #include <...> just pick any directory given to the compiler which resolved sucessfully the specified path. Since CppUnit only require include/, the sucessful resolution can only appear with a "miraculous" other unspecified directory... Let's me know how it goes. > > Documentation is somewhat better now. :-) > > Anyway I still don't like the CppUnit::TextUi::TestRunner > implementation. I don't like the call to runner.run with its boolean > arguments for progress printing, waiting and summary printing. We do > have listeners, if I do not add a listener I obvisiously do not want > progress printing or waiting. If I do not add an outputter I > obvisiously do not want a summary. > I think the runner should never ever add a listener on its own, > especially not like in TestRunner.cpp in method runTest (Test*, bool) > around line 131. > IMHO that's a good place to do some refactoring. I'll probably fix that after 1.8.0. I think I'll introduce a CppUnit::TestRunner class which does not use any outputter, but create a default TestResult and give access to the TestResult. run() would run the specified test and that's it. > > Another place for refactoring: have the CPPUNIT_ASSERT_EQUAL_MESSAGE > macro take the message as its first argument as CPPUNIT_ASSERT_MESSAGE > macro does. (Or make the message always the last argument, but make it > always the same way.) I made the change in the current CVS version. message is now the first argument. Thanks for the feedback, Baptiste. |
From: Baptiste L. <gai...@fr...> - 2002-04-04 15:38:33
|
Using CppUnit 1.7.10, you just replace TextUi::TestRunner default outputter with the XML outputter: CppUnit::TextUi::TestRunner runner; runner.addTest( ExampleTestCase::suite() ); runner.setOutputter( new Unit::XmlOutputter( &runner.result(), std::cout ) ); // stream the XML is written to runner.run( "", false ); // Run all tests and don't wait => look up TextUi::TestRunner for some more details. Let's me know if there is problem for Ant integration. You can also find some informations in examples/cppunittest/XmlOutputterTest.cpp. Baptiste. ----- Original Message ----- From: "Ravi Dodla" <Rav...@va...> To: <cpp...@li...> Sent: Thursday, April 04, 2002 1:09 AM Subject: [Cppunit-devel] Unit Test Results in xml and Ant Integration > Hello, > I am trying to setup Continuous Integration with Ant and Cruise Control for > a C++ project .. > > Is there a convinient way to run cppunit test suites and get the results in > a xml format ... > > Please refer me to any examples if you can ... > > Thanks > Ravi > > _______________________________________________ > Cppunit-devel mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppunit-devel > |
From: Robert W. <ro...@po...> - 2002-04-04 13:51:29
|
Hi! Seems to be almost fine under Linux for me, too. During installation I get these messages: $ autoconf You should update your `aclocal.m4' by running aclocal. And later: $ make install [...] /usr/bin/install: cannot create regular file `/usr/local/share/cppunit/html/html/index.html': No such file or directory make[2]: *** [install-htmlDATA] Error 1 That's one "html" too much? On using the deprecated TextTestRunner.h the preprocessor could not find the include file, I changed in include/cppunit/TextTestRunner.h this line #include <cppunitui/text/TestRunner.h> to #include <../cppunitui/text/TestRunner.h> Documentation is somewhat better now. :-) Anyway I still don't like the CppUnit::TextUi::TestRunner implementation. I don't like the call to runner.run with its boolean arguments for progress printing, waiting and summary printing. We do have listeners, if I do not add a listener I obvisiously do not want progress printing or waiting. If I do not add an outputter I obvisiously do not want a summary. I think the runner should never ever add a listener on its own, especially not like in TestRunner.cpp in method runTest (Test*, bool) around line 131. IMHO that's a good place to do some refactoring. Another place for refactoring: have the CPPUNIT_ASSERT_EQUAL_MESSAGE macro take the message as its first argument as CPPUNIT_ASSERT_MESSAGE macro does. (Or make the message always the last argument, but make it always the same way.) Robert |
From: Robert W. <ro...@po...> - 2002-04-04 13:51:27
|
Hi! Sorry if you get this email more than once, it was returned yesterday because it could not be delivered for 4 hours. Latest version seems to be almost fine under Linux for me, too. During installation I get these messages: $ autoconf You should update your `aclocal.m4' by running aclocal. And later: $ make install [...] /usr/bin/install: cannot create regular file `/usr/local/share/cppunit/html/html/index.html': No such file or directory make[2]: *** [install-htmlDATA] Error 1 That's one "html" too much? On using the deprecated TextTestRunner.h the preprocessor could not find the include file, I changed in include/cppunit/TextTestRunner.h this line #include <cppunitui/text/TestRunner.h> to #include <../cppunitui/text/TestRunner.h> Documentation is somewhat better now. :-) Anyway I still don't like the CppUnit::TextUi::TestRunner implementation. I don't like the call to runner.run with its boolean arguments for progress printing, waiting and summary printing. We do have listeners, if I do not add a listener I obvisiously do not want progress printing or waiting. If I do not add an outputter I obvisiously do not want a summary. I think the runner should never ever add a listener on its own, especially not like in TestRunner.cpp in method runTest (Test*, bool) around line 131. IMHO that's a good place to do some refactoring. Another place for refactoring: have the CPPUNIT_ASSERT_EQUAL_MESSAGE macro take the message as its first argument as CPPUNIT_ASSERT_MESSAGE macro does. (Or make the message always the last argument, but make it always the same way.) Robert |
From: Pedro F. <ped...@in...> - 2002-04-04 10:54:07
|
Hi Ravi, > I am trying to setup Continuous Integration with Ant and > Cruise Control for a C++ project .. Did you find it difficult to set up Ant in a C++ environment? Could you be so kind as to send me one or two example Ant files or point me to some examples? > Is there a convinient way to run cppunit test suites and get > the results in a xml format ... Something like this should work: TestResult result; Test* test = ... test -> run (&result); ofstream output ("tests.xml"); XmlOutputter outputter (&result, output); outputter.write (); output.close (); HTH and TIA, Pedro |
From: Ravi D. <Rav...@va...> - 2002-04-04 05:58:29
|
Hello, I am trying to setup Continuous Integration with Ant and Cruise Control for a C++ project .. Is there a convinient way to run cppunit test suites and get the results in a xml format ... Please refer me to any examples if you can ... Thanks Ravi |
From: Baptiste L. <gai...@fr...> - 2002-04-03 09:15:33
|
Thanks. At least the major no go of the previous release as been resolved. Indeed, it's strange that doxygen is invoked by 'make check'. Though, I don't have the first as to were that make rule is defined. Baptiste. ----- Original Message ----- From: "Volker Boerchers" <vbo...@te...> To: "Baptiste Lepilleur" <gai...@fr...> Cc: <cpp...@li...> Sent: Tuesday, April 02, 2002 5:20 PM Subject: Re: [Cppunit-devel] CppUnit 1.7.10 tar ball On Tue, 2 Apr 2002, Baptiste Lepilleur wrote: > The tar ball are available at the following location: [...] > The problem on Unix should have been fixed. > Let me know how it goes. make && make check works well now (linux, g++ 2.95.2). btw: it's funny that 'make check' requires (and invokes) the doxygen run. Best regards, Volker -- Volker Boerchers <vbo...@te...> System Engineer TECON Systems AG, Perlengraben 2, 50676 Köln, http://www.tecon.de Tel: +49-221-92007-55, Fax: +49-221-92007-77 |
From: Volker B. <vbo...@te...> - 2002-04-02 15:21:35
|
On Tue, 2 Apr 2002, Baptiste Lepilleur wrote: > The tar ball are available at the following location: [...] > The problem on Unix should have been fixed. > Let me know how it goes. make && make check works well now (linux, g++ 2.95.2). btw: it's funny that 'make check' requires (and invokes) the doxygen run. Best regards, Volker --=20 Volker Boerchers <vbo...@te...> System Engineer TECON Systems AG, Perlengraben 2, 50676 K=F6ln, http://www.tecon.de Tel: +49-221-92007-55, Fax: +49-221-92007-77 |
From: Baptiste L. <gai...@fr...> - 2002-04-02 12:35:32
|
The tar ball are available at the following location: http://gaiacrtn.free.fr/cppunit/cppunit-1.7.10.tar.gz http://gaiacrtn.free.fr/cppunit/cppunit-docs-1.7.10.tar.gz The problem on Unix should have been fixed. Let me know how it goes. If no major issue is raised by the end of the week, it's a go for 1.8.0. New in CppUnit 1.7.10: ---------------------- In short: - new assertions - new facilities to write custom assertions - new macros to define test case in your fixture - registration of test fixture in named suite - xml & compiler format test result output - a new graphic test runner for the QT library - MFC test runner window is resizable - cppunit as a DLL - Unicode support for MFC test runner. - architecture clean-up: TestResultCollector extracted from TestResult. * architecture clean-up: TestFixture extracted from TestCase. * cookbook and documentation updated. (*) => change since 1.7.8 Baptiste. --- Baptiste Lepilleur <gai...@fr...> http://gaiacrtn.free.fr/ |
From: Baptiste L. <gai...@fr...> - 2002-04-02 12:35:32
|
----- Original Message ----- From: "Baptiste Lepilleur" <gai...@fr...> Cc: <cpp...@li...> Sent: Thursday, March 28, 2002 9:51 PM Subject: Re: [Cppunit-devel] Custom progress with TextTestRunner > ----- Original Message ----- > From: "Robert Wenner" <ro...@po...> > To: "Baptiste Lepilleur" <gai...@fr...> > Cc: <cpp...@li...> > Sent: Thursday, March 28, 2002 11:25 AM > Subject: Re: [Cppunit-devel] Custom progress with TextTestRunner > > > > On Wed, Mar 27, 2002 at 05:41:54PM +0100, Baptiste Lepilleur wrote: > > > > > Hum, actually you can already do that (forgot that I exposed the > > > eventManager to do that): > > > CppUnit::TextTestRunner runner; > > > runner.addTest( CppUnitTest::suite() ); // Add the top suite to the > test > > > runner > > > runner.eventManager().addListener( &myProgress ); // your > progress > > > indicator > > > > > > runner.run(...) > > > > > > => the TextTestProgressListener would still be used, but called your > > > listener (since it was registered first). I'll just add an option to > make it > > > optional. > > > > > In version 1.7.10 another flag (yuk) has been added to the run method to > specify you don't want the default TextTestProgressListener. > > > > > Unfortunately this does not work as expected. > > Adding my own listener as described above results in mixed output from > > my listener and TextTestProgressListener as in > > bool CppUnit::TextTestRunner::runTest(Test *test) with each call to > > this method a new TextTestProgressListener is created, added to the > > list of listeners and after the test removed. :-( > > No way to avoid this without modifying the source. > > > > Why is it done this way? Isn't that a somewhat tight coupling between > > the TestRunner and one of its Listeners? Isn't TextTestRunner > > actually a misnomer? IMHO there should be exactly one kind of > > TestRunner but it would be independent of Text, GUI or > > whatever and its Listeners and ResultCollectors would take care of > > displaying and such. > > History. Not so long ago, you couldn't parameterize anything. This will > probably change in the > future... > > Baptiste. > > > > > > > Robert > > > |
From: Robert W. <ro...@po...> - 2002-03-28 10:25:16
|
On Wed, Mar 27, 2002 at 05:41:54PM +0100, Baptiste Lepilleur wrote: > Hum, actually you can already do that (forgot that I exposed the > eventManager to do that): > CppUnit::TextTestRunner runner; > runner.addTest( CppUnitTest::suite() ); // Add the top suite to the test > runner > runner.eventManager().addListener( &myProgress ); // your progress > indicator > > runner.run(...) > > => the TextTestProgressListener would still be used, but called your > listener (since it was registered first). I'll just add an option to make it > optional. > Unfortunately this does not work as expected. Adding my own listener as described above results in mixed output from my listener and TextTestProgressListener as in bool CppUnit::TextTestRunner::runTest(Test *test) with each call to this method a new TextTestProgressListener is created, added to the list of listeners and after the test removed. :-( No way to avoid this without modifying the source. Why is it done this way? Isn't that a somewhat tight coupling between the TestRunner and one of its Listeners? Isn't TextTestRunner actually a misnomer? IMHO there should be exactly one kind of TestRunner but it would be independent of Text, GUI or whatever and its Listeners and ResultCollectors would take care of displaying and such. Robert |
From: Baptiste L. <gai...@fr...> - 2002-03-27 16:38:17
|
----- Original Message ----- From: "Robert Wenner" <ro...@po...> To: "Baptiste Lepilleur" <gai...@fr...> Cc: <cpp...@li...> Sent: Wednesday, March 27, 2002 5:11 PM Subject: Re: [Cppunit-devel] TODO Documentation > On Wed, Mar 27, 2002 at 04:46:02PM +0100, Baptiste Lepilleur wrote: > > > What you want is a custom TextTestProgressListener. At the current time it's > > hardcoded, but I'll add some methods (like setOutputer) to allow simple > > customization. Hum, actually you can already do that (forgot that I exposed the eventManager to do that): CppUnit::TextTestRunner runner; runner.addTest( CppUnitTest::suite() ); // Add the top suite to the test runner runner.eventManager().addListener( &myProgress ); // your progress indicator runner.run(...) => the TextTestProgressListener would still be used, but called your listener (since it was registered first). I'll just add an option to make it optional. Baptiste. |