How to do database unit test in asp .net [Resolved]

Posted by Karthik2010_Mca under ASP.NET on 8/14/2013 | Points: 10 | Views : 737 | Status : [Member] | Replies : 1

How to do database unit test in asp .net.
Kindly let me know anyone with example.




Posted by: Bandi on: 8/14/2013 [Member] [MVP] Platinum | Points: 50


1) Execute the query in backend for cross checking of correct functionality if you have any SQL statements in ASP .NET page
2) Checking for all the specified columns presented in the table required for the particular screen ( Cross check the column names.table names that are existed in database or not)
3) If table having col1, col2 as NOT NULL then check whether you are passing all mandatory column data to table through application or not?
4) Cross verify the sizes of Column data types, sizes with application variables that are used in application
5) Some fields data can't have duplicates in the case of UNIQUE INDEX / UNIQUE Key constraint.. So check whether your application allows to enter duplicate values for that column.. In this case your SQL operation gets failed... Be aware of that constraints...
Ex: Assume that Name column in Student table is of length = [b]10[/b].
If Your application allows to enter [b]more than 10[/b] characters, then application throws error because of Database operation got failed...
6) if there is any check constraints to check special conditions in the database, the same must be in the application
7) Field-Level Checks are: NULL Check, Unique Check, field length check, default value check, date validations, range validations, numeric value check

Mark This Response as Answer

Karthik2010_Mca, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response