This post originated from an RSS feed registered with .NET Buzz
by Robert Hurlbut.
Original Post: Enterprise Services and TDD
Feed Title: Robert Hurlbut's .Net Blog
Feed URL: http://www.asp.net/err404.htm?aspxerrorpath=/rhurlbut/Rss.aspx
Feed Description: Development with .Net, Rotor, Distributed Architectures, Security, Extreme Programming, and Databases
Roy Oshorove has written a very good introductory article on using Enterprise Services to do Test Driven Development (using NUnit) against database classes.
Our team was doing this 8 months ago when we were in the thick of ES development (see some of my blog posts from that time).
In our case, we had great success with this, but at times, we also had inconsistencies and problems. In particular, if you are testing Server Applications, you may have objects that don't get released because the client, in this case NUnit, needs to call Dispose. Also, since NUnit itself is not referencing EnterpriseServices, you may have other inconsistencies in your transactions that are not cleaned up properly.
We also had problems with Oracle (both providers from Microsoft and Oracle) in using Enterprise Services in combination with NUnit. At times we would see a test succeed individually, but it would pass or fail inconsistently when running all tests, based on the inconsistent state of the transactions mentioned above.
I like Roy's approach, though, and I will be interested in determining if this has helped solve some of the problems we were seeing with our results.