Sunday, January 24, 2010

What is test case design?how can it be done for the Small programs?

Test Case can be developed either for a small module or for a whole application.Test cases developed for a small unit/module is referred to as unit test cases where as you can also develop test case for the whole flow ie the flow of program for various units usually referred to as functional test case. For example when you click a link a corresponding page will turn up.This is a test case,usually belong to the category of functional test case.Test cases include both positive and negative output.Even you can write a test case by giving a value which can result in error and verify it.What is test case design?how can it be done for the Small programs?
Test case design means nothing but to identify all the case in which your program is supposed to run and then creating such test cases. These are independent of size of programs. For small programs also one can identify all the input cases and apply it on running program.


e.g.


the test cases for a simple search program in array could be as follows:-


1) having an array of 10 elements, with search key present


2) same as 1 but search key is absent


3) search key is the first element


4) search key is last element


5) array size is 1 and test case 1 and 2


6) Array size is two and test case 3, 4 and 2


7) Array size is zero.

No comments:

Post a Comment