tags:

views:

23

answers:

1

Hallo all,

I just start my carrier after graduation. My first testing task is to test a program which is used as an interface to edit a database. This program is coded in C#. Except some reading of a couple of online tutorials on C#, I have really little concrete experience with this kind of sw test. It seems that I have to add some TestClass()s and TestMethod()s to the code, but have no idea what the test cases for the purpose of database checking should be. Could you recommend me some links on this topic or some examples on this issue?

Thanks in advance,

John

+1  A: 

You can use nUnit to code your tests. Heres a quick start tutorial

http://www.nunit.org/index.php?p=quickStart&r=2.4.2

Some basic test cases could be

Select an existing record. Assert that a record is returned

Select a non-existant record. Assert that no records are returned

Insert, and then Select the new record. Assert that record exists

Delete, and then Select the deleted record. Assert that record doesnt exist

Update and then Select the updated record. Assert that the record has the updated values



This is a generic test suite, but It is difficult to build a test suite without knowing the exact features of the system-under-test

Midhat
Thank you. In oder to Assert that a record is returned, should Assert.Inconclusive() be used?
John
i think Assert.IsNotNull/IsNull would be more suitable to check for existence/non-existence
Midhat