150 likes | 278 Views
Database unit testing with visual studio 2010. Anthony Brown anthony@found-it.net. Agenda. What is unit testing What is database unit testing When to use it Demo (that will fail….). Rocket science. In programming. In programming. Why unit test?.
E N D
Database unit testing with visual studio 2010 Anthony Brown anthony@found-it.net
Agenda • What is unit testing • What is database unit testing • When to use it • Demo (that will fail….)
Why unit test? • Allows you to ensure that individual components do what they are supposed to • Catch bugs in development cycle rather than test cycle • Easier to refactor
Prerequisites • Create database in a consistent state • Source control database objects • Test data
Reasons to not write database unit tests • CRUD operations • Time • Management
Visual studio 2010 database unit tests • Only design in premium & ultimate (run in professional) • Integrated with visual studio test framework • Can be run as part of continuous integration build • Data generator
Coming up… #SQLBITS
Picture sources • http://www.flickr.com/photos/34388067@N00/150021646/ • http://en.wikipedia.org/wiki/File:Argentina_substitute_bench_%E2%80%93_Portugal_vs._Argentina,_9th_February_2011_%281%29.jpg