guyS's WebLog

IShare, My DotNet Fingerprint

Unit Testing u should do with care or

or try to let others to do it that have the right attitude (if its an option).
Otherwise, like everything else that being done with no motivation the end result could
be with too many defects or its quality will be not be adequate.
 
Unit testing its not the fancy and glorious tasks.
Sometimes your challenge is to test a method that only retrieve few records from DBs. You
Could ask your self is it necessary.
 
The answer for it, IMHO is yes its important.
Like we all agree that unit testing is a must.
 
During the current project development work I had to get into using NUnit.
 
There r already few grasps that I would like to share with u. The tool can assist u
to be much more pedant. I guess that being a developer means being a pedant but the tool can get you a step further.
I find my self doing unit testing strictly by the rules (try to coverage each inch)  and
the important thing I find I'm enjoying it.
 
Being precise and trying to cover all my components methods become a goal.
Its can also being treat as a challenge. 
 
There r lots of advantages for doing unit testing using one of the existing tools like
NUnit which already have being discuss in lots of net resources.
One of the immediate advantages I find with unit testing in conjunction with tools like NUnit is the fact that once u cover your components with your Unit Testings u have it and u can activate it again and again (and again..). Unit Testings r developers tasks but this does not means that they should owned it and keep it to themself. Its should be shared and use by all all project developers participants.
 
Tools like NUnit achieve this goals. The unit testing r there, centered and ready to be used.
 
Another outcome of unit testing is the feeling of relaxation that your code was tested
 carefully. I don't claim that its bug less now - but its still in a better place.
 
Few things even a newbie can point on -
a well unit testing environment should be independent on the number of team members that
r working on the project, on the environment context its running - e.g, u should be able to run it
on your development PC with your testing DB and data and on a testing machine with
 a DB that already full with data (BTY - its not always easy or possible to get this level of
independence).
Posted: Nov 11 2004, 02:40 AM by guyS | with no comments
Filed under: ,

Comments

No Comments

Leave a Comment

(required) 

(required) 

(optional)

(required)