Results 1 to 10 of 10

Thread: NUnit for testing? Anyone use it?

  1. #1

    Thread Starter
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464

    NUnit for testing? Anyone use it?

    The title says it all, I just was wondering if anyone is using NUnit in their application development?

    If so, how is it working out for you? Do you find it hard, or easy to implement? Does it really limit the bugs like they say it does?

    If you are wondering what NUnit is, you can look here....
    www.nunit.org

  2. #2
    Hyperactive Member
    Join Date
    Aug 2002
    Location
    Fort Collins, CO
    Posts
    366
    I live and die by it. I seriously don't know how I've gotten anywhere in software development without it(and it's predecessors). Takes longer to develop but you find bugs early. It's painfully simply to implement, there's no reason not to use it. It's most helpful with big projects. You make a change in your code in one place, run all of your tests and immediately see what, if anything broke because of the change. Hardest part for me was learning how to write good tests. It just takes practice.

  3. #3

    Thread Starter
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Originally posted by pvb
    I live and die by it. I seriously don't know how I've gotten anywhere in software development without it(and it's predecessors). Takes longer to develop but you find bugs early. It's painfully simply to implement, there's no reason not to use it. It's most helpful with big projects. You make a change in your code in one place, run all of your tests and immediately see what, if anything broke because of the change. Hardest part for me was learning how to write good tests. It just takes practice.
    AWESOME...That is the exact kind of feedback I was hoping to get. Thanks a lot for the feedback.

    I just looked at it, and thought that unit testing really needs to be brought into our shop (right now we are not doing it). NUnit looks to be super simple from what I have seen, and I am going to use it on a site redesign I am doing for my site to give it a try.

    Your right, it looks like writing the tests effectively is a big challenge, and a hurdle up front. I hope to do the stumbling on my own before I bring this to our team. We are getting closer to coding a year long project (the coding will be 3 solid months).

    One more question, after the initial stumbling period of learning how to write effective tests, do you save in coding time later (debug time)? Or are you running about the same? More?


    Thanks for your input.

  4. #4
    Hyperactive Member
    Join Date
    Aug 2002
    Location
    Fort Collins, CO
    Posts
    366
    I bought Test Driven Development: By Example( Kent Beck). That helped out quite a bit with writing tests.

    I saw an entry a while back in someone's blog commenting on someone who wrote a blog entry titled Dear John…er...I Mean Debugger in her blog. After reading I thought "how stupid, no debugger? how does that work? it must not"... this was before "i got it". The point is this. I just noticed the other day, that I really hardly ever step through my code. It's really weird, but you write a simple test case or two, to verify beyond a shadow of a doubt that your code works, and you're done with it.

    As an example, last week two other developers on my team were stuck on a problem(oh, i'm the only one as of yet that uses NUnit or any unittesting for that matter). So they spent about 2 hours stepping through code. Until they noticed the problem, they were inserting something into a table and assumed they were gettings a certain value back; they weren't. If they had thrown a unit test on there to verify that no matter what, for that chunk of code, if you do x you always get back y, that problem would never of happened. If you don't get the expected outcome, then you find out why and fix it. But that happens earlier than later. So that was 2 hours each, a total of 4 hours of chasing a bug. A unit test that may have taken 5 to 10 minutes max to write would not have allowed that bug into the code in the first place and saved 4 hours of dev time and eliminated any need of stepping through the code.

    So ya, it takes longer up front to write the tests, but you save mountains of time later because you have fewer bugs(not that my code ever had bugs to begin with )

  5. #5
    Frenzied Member
    Join Date
    May 2002
    Posts
    1,602
    Im going to take a 3 day course that includes design patterns and Nunit... I have started to test it... but nothing serious for now.. I will wait until the course... if my stupid boss agree that I can take it. It's wierd, some developers on my team can take courses worth 15000 USD... but when i want to take a course (cost 1000 USD) then it is al of a sudden very hard to get an ok. It's worth noting that I have never asked for a course before. But our department is very poor in testing software... so I figured it was a good idea to start with test driven development...


    kind regards
    Henrik - can I hire a boss-exterminator?

  6. #6
    Addicted Member
    Join Date
    Dec 2002
    Posts
    175
    Interesting feedback, we are about to embark on a large project and I am very interested in utilising NUnit. Perhaps we could suggest a dedicated area for Nunit and testing and keep up the feedback on this? Advice on best tests.
    Thanks.

  7. #7
    Hyperactive Member
    Join Date
    Aug 2002
    Location
    Fort Collins, CO
    Posts
    366
    That's a good idea. Maybe an area for any type of testing tool and practices(JUnit, NUnit, PyUnit, TSqlUnit, AspUnit, utPLSQL, etc...)

  8. #8

    Thread Starter
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    The term I see a lot while I have been looking into this is "Test Driven Development", maybe that is what we are looking at.

  9. #9
    Addicted Member
    Join Date
    Dec 2002
    Posts
    175
    How do we go about asking for a sub forum for this?
    Thanks.

  10. #10

    Thread Starter
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    I think this forum is perfect for it. Hardly anyone uses it anyway.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width