Home > CodeProject, Testing, Unit Tests > Am I officially a “nerd”??

Am I officially a “nerd”??

okay i know this is lame.. but i am seriously getting a high from writing unit test cases.. seriously it’s such a rush to see 243 test cases all run AND pass in a matter of seconds… if i don’t stop i am afraid i’ll turn into a “testaholic”

Post to Twitter Post to Yahoo Buzz Post to Delicious Post to Digg Post to Facebook Post to Reddit Reddit Post to StumbleUpon

Tags:
  1. Nisar
    February 10th, 2010 at 20:02 | #1

    what is the best way of testing, should you go to db and pull data or stub/fake data?

  2. Nizar
    February 11th, 2010 at 09:50 | #2

    Depends on what kind of testing you’re doing. If it’s unit testing, then you should stub out the DB layer for at least the following reasons. 1. You have more control over the fake data, 2. There is no reason to run all the logic is the DB layer since you are unit testing. 2. Your unit test will be much faster.

    If you are doing an integrated test then yes you should hit the DB and run all the logic in between that.

    Hope this helps!

  1. No trackbacks yet.

Spam Protection by WP-SpamFree Plugin

Bad Behavior has blocked 249 access attempts in the last 7 days.