Where do we start using Unit testing?
I have some doubts about where to start using Unit testing.
I am doing unit testing with Junit in RAD. And I am doing it after all code is ready to deploy
or may be after deployment. I am confused why we are doing unit testing after code is almost ready to deploy.
My question is when we should start unit testing?
I have some moe questions.....
What I am doing in my unit testing is I took one method from a class and create a test class for that method
In that class i give some input values to the method and expect respected output values from the database.
Now here the single test class does takeing input values->passing it to method->calling the method from original class
->database connection->fetching value from DB->return it to test class.
If test successfully runs then Junit console shows Green Bar else Red bar.
Red bar with the cause of error.But it doesnt generate any unit test report.
Now here is my question...
Am I doing correct unit testing? Since a single unit test method comprises all code flow and gives result...
vrushusun, I've found it
vrushusun,
I've found it most useful to start testing before I write my first line of code. See
http://junit.sourceforge.net/doc/testinfected/testing.htm
Good luck,
David Saff
Thanks David
Thanks David