DbUnit.NET Alternatives

后端 未结 3 1903
星月不相逢
星月不相逢 2020-12-24 02:34

Are there other \'.NET (2.0) Unit Testing Framework for Database Access Code\' besides DbUnit.NET?

I\'ve been trying DbUnit.NET and some things are not supported. Al

3条回答
  •  再見小時候
    2020-12-24 03:28

    Consider tdunit:

    TDUnit is a unit testing utility similar to DBUnit.Net. TDUnit helps with unit testing database access by allowing you to keep identity columns and foreign key constraints enabled on your test database by allowing dependency values within the test data XML file.

    TDUnit uses an XML file similar in spirit to DBUnit's to specify test data to be loaded into a database with one major difference. TDUnit allows for the creation of test data that contains identity columns and relationships between tables. For example in TDUnit you can load a customer row into the Customer table and then reference the auto generated ID (Identity Column) for the customer in the Order table. Although written in C# 3.0 it can be used from .Net 2.0 projects as long as the .Net Framework 3.5 is installed. By specifying the test data in XML files, the data required for the tests can be kept with the tests and TDUnit inserts and removes the test data. This allows your test database to remain empty, allowing for faster changes and easier distribution to the team.

    ~ from Project Description on their home page.

提交回复
热议问题