TDUnit

A unit testing utility similar to DBUnit.Net
Download

TDUnit Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Freeware
  • Publisher Name:
  • Aaron Dargel
  • Operating Systems:
  • Windows All
  • File Size:
  • 15 KB

TDUnit Tags


TDUnit Description

TDUnit was designed to be 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. TDUnit is used as a test utility, in that you do not need to inherit from certain classes to use it. Just instantiate the TestDataUtility class for the database you are using and call SetUp() on it. When done call TearDown(). You decide when the test data gets created and removed. The test data can be in an XML file and specified by file name, or you can add it as literal text right in the test you are writing. All of this makes TDUnit a very useful, powerful, and, hopefully, user friendly test utility. As of right now TDUnit works with MS SQL Server and SQLEXPRESS. However, the project was designed with extensibility in mind, so download the source code and create your own ScriptEngine and ScriptExecutionEngine classes by implementing IScriptEngine and IScriptExecutionEngine for your favorite DBMS. You can use SqlServerScriptExecutionEngine.cs and BasicSqlScriptEngine.cs as examples of what you need to do. SqlServerTestDataUtility makes instantiating a TestDataUtility object for MS SQL Server a breeze.


TDUnit Related Software