Feedback

what's your question? be descriptive.

By: Asked

Gentle introduction to TDD for a Linux C++ developer

I have no experience with any agile methodologies or even unit testing for that matter. What are good online tutorials that don't assume much prior knowledge of Test Driven Development? If there are any that use C++ as the example language, Linux as the development platform, or C++ testing frameworks then that would be doubly helpful.

Add comment viewed 428 times Latest activity over 1 year ago

or Cancel

3 answers

  • 1

tux

Here is a big list of Testing Frameworks. (More up-to-date then reviewed date indicates). I haven't used any of the C++ frameworks but have heard CppUnit being used on projects.

C++ Testing frameworks are more difficult than .Net, but alot of that is the nature of the language. Without reflection its not possible to have mock objects and testing attributes. Also, C++ generally has alot of OS specific API commands that make the test environment harder to establish and maintain.

NN comments
neophyte
-

That list hasn’t been updated since 25 Apr 2003, so I worry about its current usefulness.

or Cancel
  • 1

aleksey dmitriyev

If you are starting a C++ project from scratch, it should not be a problem. You can start with a simple and lightweight tool like CxxTest. It's more like an art to structure your code in a testable way, and force yourself to do it diligently.

If you have an existing C++ project, there is a big chance it's not really unit test friendly. The best/classic book to read about that is "Working Effectively with Legacy Code". If I remember correctly, it will also give you an introduction into the Fit/Fitness style of testing.

NN comments
neophyte
-

Have any tutorial suggestions for CxxTest?

or Cancel