|
|
| Author |
Message |
jspaulpeter
New User
Joined: 25 Aug 2005 Posts: 12
|
|
|
|
hi friends,
what are test cases need?
if i will do the unit test cases for one program that is source.
what are the steps i need to follow |
|
| Back to top |
|
 |
References
|
Posted: Fri Jan 19, 2007 9:50 am Post subject: Re: what are test cases need when you do the unit test cases? |
 |
|
|
 |
rajesh_1183
Active User
Joined: 24 Nov 2005 Posts: 130 Location: Tadepalligudem
|
|
|
|
Prepare the input data such that it should execute all the lines that you have coded.
So while preparing test data...you might encounter all kinds of test cases |
|
| Back to top |
|
 |
DavidatK
Senior Member
Joined: 22 Nov 2005 Posts: 718 Location: Troy, Michigan USA
|
|
|
|
jspaulpeter
Test cases should exercise all conditions in your program, with expected results.
Lets say you have two input files, a master file, and a transaction file. You update the master record (or create a new one for a transaction that does not exists and write a new master file.
Test cases in part might be:
Test case: Empty master file
Expected result: Program abends with message, master file should NEVER be empty
Test case: Empty Transaction file
Expected Result: Program continues, with message, Transaction file could be empty (holiday)
Test case: Transaction file not in expected sort order.
Expected Result: Program abends with message, record number previous key, current key.
Test case: Duplicate Transaction file keys.
Expected Result: Programs updated master file with both transactions.
Test case: Duplicate Master file keys.
Expected Result: Program abends with message, Record number, key
You need to be very specific with the test case and the expected results. If you cannot do this, you do not understand the requirements well enough. |
|
| Back to top |
|
 |
|
|