Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#250252 - 23/02/2005 17:42 Wanted: A lightweight testing framework for C development
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
I've been doing C programming for a long time, and I've always rolled my own test <air_quotes>framework</air_quotes> for doing unit and regression tests. For the project I'm on now at my new employer, we'd like something a little more structured, but still hopefully lightweight enough that we don't spend half our time maintaining the test cases.

So, I was wondering if anyone uses, has used, or is familiar with a testing framework that I can integrate into our library, and eventually, the applications that sit on top of the library. The idea is that, as you're developing the code, you write test cases as functions in the same .c file, add them into the "bag of test cases" for that module, and then you can exercise those tests automatically after nightly builds, or run specific ones any time thereafter. Maybe even better would be some kind of system for passing in arbitrary sets of test data from flat text files and/or command line params to the test driver.

Any ideas?
_________________________
- Tony C
my empeg stuff

Top
#250253 - 24/02/2005 07:56 Re: Wanted: A lightweight testing framework for C development [Re: tonyc]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5680
Loc: London, UK
Quote:
we'd like something a little more structured


Have you looked at CUnit? Watch how you type that into Google, obviously
_________________________
-- roger

Top
#250254 - 24/02/2005 09:23 Re: Wanted: A lightweight testing framework for C development [Re: Roger]
tahir
pooh-bah

Registered: 27/02/2004
Posts: 1896
Loc: London
Quote:
Have you looked at CUnit? Watch how you type that into Google, obviously


Dunno what you mean

Top
#250255 - 24/02/2005 14:19 Re: Wanted: A lightweight testing framework for C development [Re: Roger]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
Check also looks interesting.
_________________________
Bitt Faulk

Top
#250256 - 24/02/2005 14:39 Re: Wanted: A lightweight testing framework for C development [Re: wfaulk]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
Yeah, I came across those two in my Googling before I posted yesterday. They look like the two best contenders out there. Check has the advantage of being much better documented and having better options for output of test results, along with an easy way to organize test cases into test suites, and call those test suites from a single entry point, which is something we really want for our nightly build tests. Seeing nothing better out there, I'll give check a shot.
_________________________
- Tony C
my empeg stuff

Top