Results 1 to 9 of 9

Thread: unit test - what is it?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2003
    Posts
    175

    unit test - what is it?

    hi all
    what is a unit test? and how do i create a test??? i need to inspect the Test toolbar and i dont know what is it?
    i have in general several classes how can i create a test for them??
    thanks for answer

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: unit test - what is it?

    Unit testing, generally speaking, is the testing you, the programmer does, to make sure the code you are writing works the way it is supposed to and without errors.

    In my shop, the programmers unit test their code, then ship it QA (Quality Assurance) who retest the code, and then we ship it to the customer and they do acceptance testing. (And when they accept it, my company gets paid ).

  3. #3
    Hyperactive Member Sgt-Peppa's Avatar
    Join Date
    Mar 2003
    Location
    Munich - Germany
    Posts
    476

    Re: unit test - what is it?

    There are Tools that let you code Unit - Tests like NUnit.

    This is really nice for automated testing of your components.

    BTW:
    All of that Unit Testing can even be driven further with so called "Test Driven Development". This means after knowing what your component is supposed to do you write the Unit Tests for all Test Cases before coding your actual Component. Then you test against those Test Cases and see if you implemnted your component correctly.

    More Information

    Hope that helps,

    Stephan
    Keep Smiling - even if its hard
    Frankie Says Relax, wossname Says Yeah!
    wossname:--Currently I'm wearing a gimp suit and a parachute.
    C# - Base64 Blog

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Jan 2003
    Posts
    175

    Re: unit test - what is it?

    Ok
    So first thank you.
    all what you said is "nice to have" - so what is the difference between testing code with Nunit and just writing a Console application and test through it???
    what is the benefit from Nunit Rather then Console application into i import all the classes that i want to test???
    Thanks Alot

  5. #5
    Hyperactive Member Sgt-Peppa's Avatar
    Join Date
    Mar 2003
    Location
    Munich - Germany
    Posts
    476

    Re: unit test - what is it?

    NUnit provides a nice Testframework for you that makes Unit Testing easy! Just try it and you will see what I mean! Its a little difficult for me to explain since I am not an expert on Unit testing. But I had to use it at work in three projects so far and must say I really liked it! And along with the TTD its a nice new Methodolygy (How in the world do you spell that word?). I like it!
    Just give it a try and see for self if you like it!

    Stephan
    Keep Smiling - even if its hard
    Frankie Says Relax, wossname Says Yeah!
    wossname:--Currently I'm wearing a gimp suit and a parachute.
    C# - Base64 Blog

  6. #6
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Re: unit test - what is it?

    Methodology?

  7. #7
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    Re: unit test - what is it?

    On my previous team, we used Whidbey, which got all this test functionality build in. From what I understand, before you used NUnit, a seperate Testing Framework for the .Net framework.

    As for a unit test, it's more a concept than a specific technology and it's basic function is to test the correctness of a particular piece of code, functionality, etc. It is mostly done by developers, but bigger companies (like M$ here) got seperate testing engineers that write automated test, based on test cases the developer designed as he created his code.

    What a developer normally would do, is as he PLAN a certain functionality (unit), he also PLAN how to test it. You will create this functionality and a test as you go along, from there the name "Test Driven Development"

    This is just how I see things. Might have it wrong
    Install and Configure Eclipse For both Java and PHP development
    Accessible Ajax/jQuery Forms Degrade gracefully with JavaScript Disabled

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Jan 2003
    Posts
    175

    Re: unit test - what is it?

    OK guys - you helped me alot!!!!!
    thank you all!!!

  9. #9
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    Re: unit test - what is it?

    i guess all those exclamation points means we should shut up now...
    Install and Configure Eclipse For both Java and PHP development
    Accessible Ajax/jQuery Forms Degrade gracefully with JavaScript Disabled

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