The Artima Developer Community
Sponsored Link

Agile Buzz Forum
CxxTest is different from JUnit

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Kevin Rutherford

Posts: 171
Nickname: spinach
Registered: Apr, 2006

Kevin Rutherford is an independent agile software development coach based in the UK
CxxTest is different from JUnit Posted: Oct 15, 2006 6:17 AM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by Kevin Rutherford.
Original Post: CxxTest is different from JUnit
Feed Title: silk and spinach
Feed URL: http://silkandspinach.net/blog/index.xml
Feed Description: kevin rutherford on agile software development and life in macclesfield
Latest Agile Buzz Posts
Latest Agile Buzz Posts by Kevin Rutherford
Latest Posts From silk and spinach

Advertisement

I've been stretching my TDD practice recently by dipping into the murky world of C++ again after a break of a few years. After reading a number of comparisons - notably this one by Noel Llopis - we settled on CxxTest as the project's TDD framework. I then spent a few days converting and refactoring a few existing tests, and writing a load of new ones, to get an initial test suite going.

I discovered one big surprise along the way: unlike JUnit et al, each test suite class is only instantiated once, regardless of how many testXXX() methods it has. This means that the suite's setUp() and tearDown() methods are always acting on the same fixture instance throughout the test run; and the test suite's constructor is only invoked once. So for test independence it's essential to only put pointers into the test's state, so that all test objects can be safely deleted.

Another minor irritation is that CxxTest doesn't easily allow me to run a subset of the tests. This is a useful feature when working with legacy code, because it's sometimes hard to locate a crash among a few hundred tests.

What else should I know about? Are there any other gotchas? Have you found other styles of working with CxxTest?

(Note: CxxTest is also commonly - and mistakenly - known as CxxUnit.)

Read: CxxTest is different from JUnit

Topic: More notice for Smalltalk Previous Topic   Next Topic Topic: More Google Rumors

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use