You have to do the following for writing the database test cases.

1. First of all you have to understand the functional requirement of the application thoroughly.

2. Then you have to find out the back end tables used, joined used between the tables, cursors used (if any), triggers used(if any), stored procedures used (if any), input parameter used and output parameters used for developing that requirement.

3. After knowing all these things you have to write the test case with different input values for checking all the paths of SP.

One thing writing test cases for back end testing not like functional testing. You have to use white box testing techniques.



To write test case for database it’s just like functional testing.

1.Objective: Write the objective that you would like to test. eg: To check the shipment that i load thru xml is getting inserted for particular customer.

2.Write the method of input or action that you do. eg: Load an xml with all data which can be added to a customer.

3.Expected :Input should be viewed in database. eg: The shipment should be loaded successfully for that customer, also it should be seen in application.

4.You can write such type of test cases for any functionality like update, delete etc.

Example: Let's say there are two web sites, type 'ABC' records should be displayed only in ABC website and type 'XYZ' records should be displayed only in XYZ website. You can insert a new type 'ABC' record and see if it is displayed only on ABC website and not on XYZ website. Both the websites are controlled by the same company, it just wants type I customers to have access to type I website and Type II customers have access to type II website. This is a completely imaginary example, there can be any type of application or service functionality that can be broken down in to test cases in turn.





0 comments