views:

52

answers:

2

Hi everyone,

I'm thinking of designing my own Test library (framework) ->in c++ I am wondering if some of you have already designed there own (and what good advices, documentation they could offer me), decided to not do that (and why), What critics (and argue) you have against differents existing testing frameworks.

I want to no more about testing framework design. In fact I have some pretty differents things to test :

  • simple unit test
  • MVC and signal slot
  • data, (escpecially for audio and DSP)
  • performance
  • compatibility

"So much things ... and so few time "

No really I need to test a lot of different things. So I checkout how is designed XUnit, and the Addison and W XUnit related book, also the Advanced Unit Testing related article on code project.... And different articles, discuss this with coworkers ... And at the end, I want to design my own.

Why :

  • specific needs,
  • like the do it yourself way (and learn why it's done this way in existing frameworks and that I'm not a genious ... ^^)

Thank you all.

+1  A: 

I remember having read some discussions about Cppunit 2 design on the sourceforge wiki. I'd start from here. Also, Noel Llopis explored the C++ unit-testing framework jungle.

But, you're saying you want to re-create another framework and you only have few time left. I'd suggest picking one framework fitting your need for the unit tests, see if it can be used fore your MVC and data testing. Moreover unit testing framework are not designed to run performance tests. I'd recommend following the Unix philosophy here: simple little tools that do one thing and do it well.

philippe
sorry, It's not I have a few time, it is just a quote (but I don't remember who) "so much thing .... and so few time"By the way, for know I did the same (read doc of CppUnit, and JUnit, and AUT)For performance, I already did it (or part of it) to compare the performance of unrolled loop for DSP, and of SSE on differents plateform, and the architecture is pretty the same it seems.
dzada
+1  A: 

Learn at least one existing framwork before you implement your own. My experience is that the framework is not the problem. Learning how to write good unit tests is the hard part.

I have used several framworks through the years including CxxTest, CppUnitLite and UnitTest++. But my recommendation is Google Test together with Google Mock (Google Mock comes with a copy of Google Test bundled).

Tobbe