Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jul 8th, 2005, 8:07 AM   #1
mevuorin
Newbie
 
Join Date: Jul 2005
Posts: 10
Rep Power: 0 mevuorin is on a distinguished road
unit testing in c: which framework?

I've tried CUnit and Check for unit testing in c. CUnit has so far seemed good: it's simple and powerful enough. Check is probably better than CUnit, but I couldn't realy use it, because I'm novice to GNU autotools and the only Check tutorial I found used autotools a lot and figuring out why I got a weird errors following the tutorial became too hard. I switched back to CUnit for now and study autotools more when I'll find time.

Have you used Check, CUnit or other unit testing frameworks? Which one would you choose?

I think I've heard/read somewhere, that CUnit could be integrated with eclipse. I've tried to find information about that, but have had no luck. Am I just dreaming about easy c unit testing using eclipse?
mevuorin is offline   Reply With Quote
Old Jul 8th, 2005, 10:25 AM   #2
jim mcnamara
Hobbyist Programmer
 
Join Date: Jun 2005
Location: New Mexico
Posts: 228
Rep Power: 4 jim mcnamara is on a distinguished road
Dreaming? Probably.

We looked extensively for tools for unit testing and complete QA. In the end we do the following for unit testing:

1. use Clint - zero warnings required.
2. bought and use PolySpace verifier (static code analysis)
3. ported existing code to generate McCabe numbers (cyclomatic indices) and other static measures.
4. Based on the results of the above, we have a defined unit test suite set of procedures we run our code through, we know the expected outputs ahead of time. If the any of the above numbers or performance numbers are not good or there are issues with expected results, we have to back pedal into development.

5. All of the above results a stored in Serena TeamTrack, then passed on to official QA.

I have one blob of C code that takes two-three days just to unit test.
jim mcnamara is offline   Reply With Quote
Old Jul 11th, 2005, 2:29 AM   #3
mevuorin
Newbie
 
Join Date: Jul 2005
Posts: 10
Rep Power: 0 mevuorin is on a distinguished road
You're involved with a lot bigger projects than I am. I'm doing projects with just few thousand lines of code. I guess most of the techniques you're using would be too heavy for small projects like mine. I think I'll start using lint though. I had forgotten it. Thanks for reminding.

Quote:
I have one blob of C code that takes two-three days just to unit test.
Wow. Thats one big blob. :eek: How many lines of code?
mevuorin is offline   Reply With Quote
Old Jul 11th, 2005, 10:22 AM   #4
jim mcnamara
Hobbyist Programmer
 
Join Date: Jun 2005
Location: New Mexico
Posts: 228
Rep Power: 4 jim mcnamara is on a distinguished road
100K lines of C code - several dozen C modules, plus 30 standard database interface C modules.
jim mcnamara is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 11:26 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC