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
Printable View
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
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 :D ).
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
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
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
Methodology?
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
OK guys - you helped me alot!!!!!
thank you all!!!
i guess all those exclamation points means we should shut up now... :D