From: Piotr B. <dms...@gm...> - 2013-01-06 19:37:57
|
After some search I've found a couple of valuable frameworks. An interesting comparison can be found here: http://gamesfromwithin.com/exploring-the-c-unit-testing-framework-jungle. @Sakthivel: I begin with the exploring of CxxTest-Framework Piotr |
From: Ulf L. <ul...@wa...> - 2013-01-07 21:28:00
|
On Sun, 6 Jan 2013 20:37:51 +0100 Piotr Bienkiewicz <dms...@gm...> wrote: > After some search I've found a couple of valuable frameworks. > An interesting comparison can be found here: > http://gamesfromwithin.com/exploring-the-c-unit-testing-framework-jungle. Nice, and pretty much what I was thinking of, though a little outdated, and some things like his portability concerns are not relevant for us. After having looked around for the tensor stuff, I would suggest that you rank the libraries (and maybe more if you find them, e.g., googletest) using the criteria 1,3,4,(5), throw out strange projects (bad documentation, arcane installation, inactive projects), and try out the best, say, 4 candidates. To keep the amount of work in a reasonable frame. This mail also reminds me of a ping that I wanted to write: If you get a task, could you always acknowledge it in some way (assigning the task to yourself, mailing a short ok or something), just to give me the feeling something is happening. :) Ulf |
From: Piotr B. <dms...@gm...> - 2013-01-09 23:21:46
|
Following the suggestion i will try to describe some relevant features of the CxxTest framework: 1. Minimal amount of work needed to add new tests Creating new test cases with CxxTest turns out pretty easy and requires minimal programming effort. No manual registration of test cases or use of some ugly macros is needed. CxxTest gets around that by parsing test cases and generating a C++ test runner. The build process looks like the following: 1. Tests are defined in C++ header files 2. The "cxxtestgen" command line tool processes header files to generate files for the test runner. 3. Finally, the test runner can be compiled and executed to run all test suites. 3. Supports fixtures. Great support. A wide range of functions available: - setup/teardown for individual tests - setup/teardown for the whole test suite - world(global) fixtures 4. Handles exceptions and crashes well Very good. Again, a rich set of functions is available to check if certain exceptions were thrown. No support for dealing with C++ signals found yet. I have not found on this topic in the documentation or during google search. Maybe we'll find more info in CxxTest forum. I have already asked for some hint - https://groups.google.com/forum/?hl=en#!forum/cxxtest-forum 5. Supports different outputs Good support. In addition to the standard output, the test results can be stored in XML format. Another plus - CxxTest supports testing with mock objects which i will study in next step. Last but not least i have attached an example test suite to the Ticket. Piotr 2013/1/7 Ulf Lorenz <ul...@wa...> > On Sun, 6 Jan 2013 20:37:51 +0100 > Piotr Bienkiewicz <dms...@gm...> wrote: > > > After some search I've found a couple of valuable frameworks. > > An interesting comparison can be found here: > > http://gamesfromwithin.com/exploring-the-c-unit-testing-framework-jungle > . > > Nice, and pretty much what I was thinking of, though a little outdated, > and some things like his portability concerns are not relevant for us. > After having looked around for the tensor stuff, I would suggest that > you rank the libraries (and maybe more if you find them, e.g., > googletest) using the criteria 1,3,4,(5), throw out strange projects > (bad documentation, arcane installation, inactive projects), and try > out the best, say, 4 candidates. To keep the amount of work in a > reasonable frame. > > > This mail also reminds me of a ping that I wanted to write: If you get a > task, could you always acknowledge it in some way (assigning the task > to yourself, mailing a short ok or something), just to give me the > feeling something is happening. :) > > > Ulf > > > ------------------------------------------------------------------------------ > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft > MVPs and experts. SALE $99.99 this month only -- learn more at: > http://p.sf.net/sfu/learnmore_122412 > _______________________________________________ > Wavepacket-ng-devel mailing list > Wav...@li... > https://lists.sourceforge.net/lists/listinfo/wavepacket-ng-devel > |
From: Piotr B. <dms...@gm...> - 2013-01-09 23:25:02
|
@Ulf : I tried to attach an example program to ticket but it seems not to work. I can't see the posted attachment. 2013/1/10 Piotr Bienkiewicz <dms...@gm...> > Following the suggestion i will try to describe some relevant features of > the CxxTest framework: > > 1. Minimal amount of work needed to add new tests > > Creating new test cases with CxxTest turns out pretty easy and requires > minimal programming effort. > No manual registration of test cases or use of some ugly macros is needed. > CxxTest gets around that by parsing test cases and generating a C++ test > runner. > The build process looks like the following: > 1. Tests are defined in C++ header files > 2. The "cxxtestgen" command line tool processes header files to generate > files for the test runner. > 3. Finally, the test runner can be compiled and executed to run all test > suites. > > 3. Supports fixtures. > > Great support. A wide range of functions available: > - setup/teardown for individual tests > - setup/teardown for the whole test suite > - world(global) fixtures > > 4. Handles exceptions and crashes well > > Very good. Again, a rich set of functions is available to check if certain > exceptions were thrown. > No support for dealing with C++ signals found yet. > I have not found on this topic in the documentation or during google > search. > Maybe we'll find more info in CxxTest forum. I have already asked for some > hint - https://groups.google.com/forum/?hl=en#!forum/cxxtest-forum > > 5. Supports different outputs > > Good support. In addition to the standard output, the test results can be > stored in XML format. > > Another plus - CxxTest supports testing with mock objects which i will > study in next step. > Last but not least i have attached an example test suite to the Ticket. > > Piotr > > 2013/1/7 Ulf Lorenz <ul...@wa...> > >> On Sun, 6 Jan 2013 20:37:51 +0100 >> Piotr Bienkiewicz <dms...@gm...> wrote: >> >> > After some search I've found a couple of valuable frameworks. >> > An interesting comparison can be found here: >> > >> http://gamesfromwithin.com/exploring-the-c-unit-testing-framework-jungle. >> >> Nice, and pretty much what I was thinking of, though a little outdated, >> and some things like his portability concerns are not relevant for us. >> After having looked around for the tensor stuff, I would suggest that >> you rank the libraries (and maybe more if you find them, e.g., >> googletest) using the criteria 1,3,4,(5), throw out strange projects >> (bad documentation, arcane installation, inactive projects), and try >> out the best, say, 4 candidates. To keep the amount of work in a >> reasonable frame. >> >> >> This mail also reminds me of a ping that I wanted to write: If you get a >> task, could you always acknowledge it in some way (assigning the task >> to yourself, mailing a short ok or something), just to give me the >> feeling something is happening. :) >> >> >> Ulf >> >> >> ------------------------------------------------------------------------------ >> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, >> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current >> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft >> MVPs and experts. SALE $99.99 this month only -- learn more at: >> http://p.sf.net/sfu/learnmore_122412 >> _______________________________________________ >> Wavepacket-ng-devel mailing list >> Wav...@li... >> https://lists.sourceforge.net/lists/listinfo/wavepacket-ng-devel >> > > |
From: Ulf L. <ul...@wa...> - 2013-01-10 22:29:41
|
On Thu, 10 Jan 2013 00:24:55 +0100 Piotr Bienkiewicz <dms...@gm...> wrote: > @Ulf : I tried to attach an example program to ticket but it seems > not to work. I can't see the posted attachment. Mmh. I just tried and it worked for me. Did you click on post and everything? Can you actually post at all? There might be some problems with various source forge tools. However, they do also fix things rather quick, so if this problem stays, I would suggest to raise this issue under https://sourceforge.net/p/forge/site-support/ Last but not least, I do not mind if you put the test code with a minimalistic Makefile and/or build readme in the repository. Ulf |
From: Piotr B. <dms...@gm...> - 2013-01-15 22:28:23
|
Hi Ulf/all, I've just committed a small cxxtest sample project. Check out the repository! Since cxxtest doesn't supports features to test an occurrence of C++ signals, there is an possible workaround posted by Bill Hart in cxxtest help-forum: "At the moment, signal handlers are not supported in CxxTest. However, you could support this by creating a signal handler that throws an exception that is caught by CxxTest using TS_ASSERT_ THROWS." In addition to the JUnit-like behavior, cxxtest provides a mechanism for defining mock functions. Unfortunately it seems that it supports merely mocking a global/static member functions - https://github.com/CxxTest/cxxtest/issues/52 For the moment i would finish the exploration of cxxtest and go on to evaluate another framework. Piotr 2013/1/10 Ulf Lorenz <ul...@wa...> > On Thu, 10 Jan 2013 00:24:55 +0100 > Piotr Bienkiewicz <dms...@gm...> wrote: > > > @Ulf : I tried to attach an example program to ticket but it seems > > not to work. I can't see the posted attachment. > > Mmh. I just tried and it worked for me. Did you click on post and > everything? Can you actually post at all? > > There might be some problems with various source forge tools. However, > they do also fix things rather quick, so if this problem stays, I would > suggest to raise this issue under > https://sourceforge.net/p/forge/site-support/ > > Last but not least, I do not mind if you put the test code with a > minimalistic Makefile and/or build readme in the repository. > > > Ulf > > > ------------------------------------------------------------------------------ > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft > MVPs and experts. ON SALE this month only -- learn more at: > http://p.sf.net/sfu/learnmore_122712 > _______________________________________________ > Wavepacket-ng-devel mailing list > Wav...@li... > https://lists.sourceforge.net/lists/listinfo/wavepacket-ng-devel > |
From: Ulf L. <ul...@wa...> - 2013-01-16 20:49:05
|
On Tue, 15 Jan 2013 23:28:16 +0100 Piotr Bienkiewicz <dms...@gm...> wrote: > Hi Ulf/all, > > I've just committed a small cxxtest sample project. Check out the > repository! > > Since cxxtest doesn't supports features to test an occurrence of C++ > signals, there is an possible workaround posted by Bill Hart in > cxxtest help-forum: > "At the moment, signal handlers are not supported in CxxTest. > However, you could support this by creating a signal handler that > throws an exception that is caught by CxxTest using TS_ASSERT_ > THROWS." Ok, the only signals that might reasonably be sent are floating point error and segfaults. We will see if we ever want to test for them (normally you want your code not to do this...). Other signals are probably not critical enough to care for them. In the worst case, we have a 30-hour simulation running. While it is annoying to get it killed, it is not extremely critical. Ulf |
From: Piotr B. <dms...@gm...> - 2013-01-22 22:36:09
|
Hello, After evaluation of cxxtest i would like to describe my experience with hippomocks. One feature that drew my attention to the framework is the simplicity in creating mock objects. There is no need to write some boilerplate code on your own to describe the behavior of the mocked objects. Only the interface definition of the object must be made known to the framework. Check out the repository to see some example. Also, it is easy to install - it consists of just one header file - and the documentation seems to be satisfactory. Trying to demonstrates the usage of sequences (one function called after another) i came across an challenge. I got the error message "Test failed: Function called without expectation!". Although my code seems to be OK, the test case fails. After some google search I found a post with the same problem - http://www.samhartsfield.com/dokuwiki/info/cxx_libraries "I had trouble getting it to work as expected; the error messages about expectations didn't make sense enough to allow me figure it out. Specifically the message "Function called without expectation"." For now, i would go on and pick up another framework to examine. Piotr 2013/1/15 Piotr Bienkiewicz <dms...@gm...> > Hi Ulf/all, > > I've just committed a small cxxtest sample project. Check out the > repository! > > Since cxxtest doesn't supports features to test an occurrence of C++ > signals, there is an possible workaround posted by Bill Hart in cxxtest > help-forum: > "At the moment, signal handlers are not supported in CxxTest. However, > you could support this by creating a signal handler that throws an > exception that is caught by CxxTest using TS_ASSERT_ THROWS." > > In addition to the JUnit-like behavior, cxxtest provides a mechanism for > defining mock functions. Unfortunately it seems that it supports merely > mocking a global/static member functions - > https://github.com/CxxTest/cxxtest/issues/52 > > For the moment i would finish the exploration of cxxtest and go on to > evaluate another framework. > > Piotr > > 2013/1/10 Ulf Lorenz <ul...@wa...> > >> On Thu, 10 Jan 2013 00:24:55 +0100 >> Piotr Bienkiewicz <dms...@gm...> wrote: >> >> > @Ulf : I tried to attach an example program to ticket but it seems >> > not to work. I can't see the posted attachment. >> >> Mmh. I just tried and it worked for me. Did you click on post and >> everything? Can you actually post at all? >> >> There might be some problems with various source forge tools. However, >> they do also fix things rather quick, so if this problem stays, I would >> suggest to raise this issue under >> https://sourceforge.net/p/forge/site-support/ >> >> Last but not least, I do not mind if you put the test code with a >> minimalistic Makefile and/or build readme in the repository. >> >> >> Ulf >> >> >> ------------------------------------------------------------------------------ >> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, >> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current >> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft >> MVPs and experts. ON SALE this month only -- learn more at: >> http://p.sf.net/sfu/learnmore_122712 >> _______________________________________________ >> Wavepacket-ng-devel mailing list >> Wav...@li... >> https://lists.sourceforge.net/lists/listinfo/wavepacket-ng-devel >> > > |
From: Ulf L. <ul...@wa...> - 2013-01-27 17:52:11
|
On Tue, 22 Jan 2013 23:36:02 +0100 Piotr Bienkiewicz <dms...@gm...> wrote: > Trying to demonstrates the usage of sequences (one function called > after another) i came across an challenge. I got the error message > "Test failed: Function called without expectation!". Although my code > seems to be OK, the test case fails. After some google search I found > a post with the same problem - > http://www.samhartsfield.com/dokuwiki/info/cxx_libraries Sounds like pretty much of a showstopper. Unless the ease of use strongly outweighs this loss of functionality. Ulf |
From: Piotr B. <dms...@gm...> - 2013-02-12 20:28:59
|
Hi All, I've looked now at both google test and google mock frameworks. There is also an example project available in repository. All required libraries have been committed too, so examples should compile easily. Both frameworks are very well documented and can be easily integrated into the build environment. The feature set is pretty big, I have only scratched the surface so feel free to play around with the example project. Since I had no problems with both frameworks and the two are fairly easy to use i would personally suggest to choose gTest and gMock for our purpose Piotr 2013/1/22 Piotr Bienkiewicz <dms...@gm...> > Hello, > > After evaluation of cxxtest i would like to describe my experience with > hippomocks. One feature that drew my attention to the framework is the > simplicity in creating mock objects. There is no need to write some > boilerplate code on your own to describe the behavior of the mocked > objects. Only the interface definition of the object must be made known to > the framework. Check out the repository to see some example. Also, it is > easy to install - it consists of just one header file - and the > documentation seems to be satisfactory. > > Trying to demonstrates the usage of sequences (one function called after > another) i came across an challenge. I got the error message "Test failed: > Function called without expectation!". Although my code seems to be OK, the > test case fails. After some google search I found a post with the same > problem - http://www.samhartsfield.com/dokuwiki/info/cxx_libraries > > "I had trouble getting it to work as expected; the error messages about > expectations didn't make sense enough to allow me figure it out. > Specifically the message "Function called without expectation"." > > For now, i would go on and pick up another framework to examine. > > Piotr > > 2013/1/15 Piotr Bienkiewicz <dms...@gm...> > >> Hi Ulf/all, >> >> I've just committed a small cxxtest sample project. Check out the >> repository! >> >> Since cxxtest doesn't supports features to test an occurrence of C++ >> signals, there is an possible workaround posted by Bill Hart in cxxtest >> help-forum: >> "At the moment, signal handlers are not supported in CxxTest. However, >> you could support this by creating a signal handler that throws an >> exception that is caught by CxxTest using TS_ASSERT_ THROWS." >> >> In addition to the JUnit-like behavior, cxxtest provides a mechanism for >> defining mock functions. Unfortunately it seems that it supports merely >> mocking a global/static member functions - >> https://github.com/CxxTest/cxxtest/issues/52 >> >> For the moment i would finish the exploration of cxxtest and go on to >> evaluate another framework. >> >> Piotr >> >> 2013/1/10 Ulf Lorenz <ul...@wa...> >> >>> On Thu, 10 Jan 2013 00:24:55 +0100 >>> Piotr Bienkiewicz <dms...@gm...> wrote: >>> >>> > @Ulf : I tried to attach an example program to ticket but it seems >>> > not to work. I can't see the posted attachment. >>> >>> Mmh. I just tried and it worked for me. Did you click on post and >>> everything? Can you actually post at all? >>> >>> There might be some problems with various source forge tools. However, >>> they do also fix things rather quick, so if this problem stays, I would >>> suggest to raise this issue under >>> https://sourceforge.net/p/forge/site-support/ >>> >>> Last but not least, I do not mind if you put the test code with a >>> minimalistic Makefile and/or build readme in the repository. >>> >>> >>> Ulf >>> >>> >>> ------------------------------------------------------------------------------ >>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, >>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current >>> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft >>> MVPs and experts. ON SALE this month only -- learn more at: >>> http://p.sf.net/sfu/learnmore_122712 >>> _______________________________________________ >>> Wavepacket-ng-devel mailing list >>> Wav...@li... >>> https://lists.sourceforge.net/lists/listinfo/wavepacket-ng-devel >>> >> >> > |
From: Ulf L. <ul...@wa...> - 2013-02-18 20:47:19
|
On Tue, 12 Feb 2013 21:28:51 +0100 Piotr Bienkiewicz <dms...@gm...> wrote: > Hi All, > > I've looked now at both google test and google mock frameworks. There > is also an example project available in repository. All required > libraries have been committed too, so examples should compile easily. > Both frameworks are very well documented and can be easily integrated > into the build environment. The feature set is pretty big, I have > only scratched the surface so feel free to play around with the > example project. Since I had no problems with both frameworks and the > two are fairly easy to use i would personally suggest to choose gTest > and gMock for our purpose Took some time to look at it, but I would second this. While GMock is not quite as simple to use as I am used to with JMock by now, this is probably unavoidable since C++ has no reflection. Ulf |