Home > Computers and Internet > Integrating NUnit

Integrating NUnit

30-Aug-05 10:06 pm EDT Leave a comment Go to comments
I’m in love!  No this isn’t an unlikely new blip on my social radar.  It’s my recent introduction to NUnit for C# and an accompanying book by Andrew Hunt & David Thomas called "Pragmatic Unit Testing"The introduction came on the project I’ve been on for the past few months – a commercial web content management system called "Symphony".  Specifically, I’m currently writing business logic for the messaging subsystem.  Unlike web content, business logic is arguably more difficult to test because the output from the code has to be solicited by a calling application before one can determine if anything they’ve written works as expected.  And it’s here where the role of "unit testing" becomes relevant.
 
The author points out that a lot of developpers get anxious about testing.  However, I genuinely found it very useful to work with testers because they’re helping me create a more solid application – not just trying to break your wonderful code in a mean-spirited way.  Developpers are all human beings (well most of us are anyway) and as such mistakes are inevitable.  Recognizing that, one see’s testers and test processes and being an asset to the process of creating solid applications everyone will rely on.
 
Admittedly, this is the very first time I’ve been part of a formal testing process.  I’ve had my code tested on numerous prior occasions, of course – but this is wehre I’m finally "getting my wings" on the whole deal and NUnit is definitely a tool that makes that process easier.  Particularly given this is raw code being written on the business layer of the application with no interface logic (at this phase).  Without testing, dozens or (more likely) hundreds of undiscovered bugs would be released into the applciation alpha that would painstakingly have to be first discovered, then debugged using cycles that could take far, far longer.  Even more incredible is that the companion testing software for C# is available at http://www.nunit.org – free as an Open Source package!
 
So there’s no excuse.  NUnit’s GUI facilitates the process of creating and executing test cases in tandem with Visual Studio.  A "stoplight’ metaphor (red, yellow and green LED-like indicators) give you a solution-wide view of what’s working and what’s not.   And textareas adjascent provide exception, stack-trace and object state data to fill in the details.  The quality that has for so long eluded web developers and their applications is now practical and available to projects leveraging .NET and C# in particular (because of the volume of documentation for it – but NUnit works with C# and VB.NET quite readily).  And NUnit certainly seems like a solid tool for testing any enterprise application; if you can get through the usual stigma associated with testing practices.  But even a modest trial run with NUnit ought to get even the most stone-faced cynnic sold.
Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Terry Glavin

CHRONICLES

Techno Manor

Geek's Corner

VM.Blog.

an IT blog.. and an occasional rant

Yammer Site Status

Is Yammer down? Offline? Broken? Undergoing scheduled maintenance? When will it be back? Find out here.

jalalaj

A journey full of wonderful experiences

Azure and beyond

My thoughts on Microsoft Azure and cloud technologies

TechCrunch

Startup and Technology News

Ottawa Citizen

Ottawa Latest News, Breaking Headlines & Sports

National Post

Canadian News, World News and Breaking Headlines

Targeted individuals's

One Government to rule them all.

Joey Li's IT Zone

Everything about IT

jenyamatya

Unravelling the magik of code...

The Bike Escape

Adventures on a road bike

The Ross Report

Now you know where you need to know more...

Lights in the Dark

A journal of space exploration

ottawatraining.wordpress.com/

Using strength to improve and eliminate injuries.

The Ross Report

Now you know where you need to know more...

Little Girl's Mostly Linux Blog

Nothing to see here. Move along...

David Eedle

Geek, tech, programmer, business owner. Serial starter of things. Occasional finisher. Oh, and please don't call me Dave.

%d bloggers like this: