Whats the heck is this , I am a developer , so i need to concentrate a lot on my roles and responsibilities , why i should care about the testing , It is none of my business . Without knowing much about What is test Driven Development , how can i start writing about the this ? But without any other option i have started to write the unit test cases . I really dont know where to start and how to start .
Initially it was little boring to write the test cases. But once i started to go through that , it became one of the routine tasks to me .
Now lets come to the Question .. What is Unit test ? Why we need to write those ?
Lets assume , we wrote a function , which takes two arguments and returns the total of that two arguments .
We need to write a test case to make sure that it will return the sum of the any given 2 numbers .
We Need to write a test case that it will through a exception when we pass only one argument
We need to Write a test case to through exception when we pass two different data types .
Finally we have to make sure that , the function which we wrote for some functionality will work exactly as per the requirements. So it is as simple as it is.
Whom Am i ?