MSDN Magazine Launch Issue - February 15, 2008 - (Page 76) Team System for Database Professionals: Resources By reducing the risks involved in making database schema changes, you can better control the integrity of your database throughout the development process. Here are some resources to help you: Rename Refactoring Support for Database Objects msdn2.microsoft.com/teamsystem/bb507197 Schema Compare to Keep Two Schema Versions Synchronized System family, it is integrated with Team Foundation Server to give team members complete visibility into all development artifacts and activities on a project. This results in the reduction of issues related to poor communication and the improvement of team productivity and effectiveness. Get a Unified View across Your Project with Team Explorer msdn2.microsoft.com/teamsystem/bb507197.aspx#schemacompare Data Compare to Keep the Data in Two Databases Synchronized msdn2.microsoft.com/teamsystem/bb496794.aspx#TeamExplorer Manage Change to Project Artifacts with Team Foundation Version Control msdn2.microsoft.com/teamsystem/bb507197.aspx#datacompare Use Offline Database Projects for Change Isolation msdn2.microsoft.com/teamsystem/bb496794.aspx#VersionControl Communicate and Manage Work across the Team with Team Foundation Work Item Tracking msdn2.microsoft.com/teamsystem/bb507197.aspx#offlineprojects Minor changes to the database can have a significant impact on other areas of the application without the impact being immediately visible. As such, it is valuable to determine the impact of schema changes early on. These Team System features will help: Extensible Unit Test Functionality msdn2.microsoft.com/teamsystem/bb496794.aspx#WorkItemTracking Collaborate Using the Team Portal msdn2.microsoft.com/teamsystem/bb496794.aspx#TeamPortal Define Your Development Process Using Team Foundation Process Templates msdn2.microsoft.com/teamsystem/bb496794.aspx#ProcessTemplates Integrate Your Team’s Work Together Regularly Using Team Foundation Build msdn2.microsoft.com/teamsystem/bb507197.aspx#extensibleunittest Data Generator to Define Sets of Repeatable Test Data msdn2.microsoft.com/teamsystem/bb496794.aspx#TeamBuild Make Real-Time Decisions Based on Performance and Quality Metrics with Reporting and Business Intelligence msdn2.microsoft.com/teamsystem/bb507197.aspx#datagenerator New Designer to Create Unit Tests in T-SQL or Managed Code msdn2.microsoft.com/teamsystem/bb507197.aspx#newtsqldesigner msdn2.microsoft.com/teamsystem/bb496794.aspx#Reporting Support Distributed and Outsourced Development Teams One of the other benefits of DBPro is that, as a part of the Team portant to check for null results because it is common for Execute to be called with no action. Once the service has been compiled into an assembly, I still need to register it in order for it to be used during test execution. In my case, I want the service to be registered for all tests in my assembly but only to log if a test fails, so I modified the IntializeAssembly method to look like the following: [AssemblyInitialize()] public static void IntializeAssembly(TestContext ctx) { LoggingTestService testService = new LoggingTestService(); testService.Verbosity = LoggingTestService.LogVerbosity.OnlyFailure; DatabaseTestClass.TestService = testService; // Setup the test database based on setting in the // configuration file DatabaseTestClass.TestService.DeployDatabaseProject(); DatabaseTestClass.TestService.GenerateData(); msdn2.microsoft.com/teamsystem/bb496794.aspx#DistributedTeams sample code download) that deserializes and displays the DataSet. Before I wrap up, I should mention that the Visual Studio test harness executes each test assembly in its own AppDomain. Because the service instance is registered via a static property, the service registration will only persist for the lifetime of the AppDomain. This does mean that you will need to reregister the test service during the initialization of each test assembly. Also, you should take a look at the sidebar, “Team System for Database Professionals: Resources”, for more information on making database schema changes. Looking Forward } Now, when I run a unit test that fails, the path to the log file will be output to the test run directory and the path to the file will be in the test results window for that test. To look at the results that caused the test failure, I created a very simple Windows Forms application (it is in the accompanying I’ve touched on many features of DBPro in this article, but the best way to get a feel for what you can do is to get your hands dirty. I suggest you experiment with the product, including working with the data generation API and the new Visual Studio 2008 power tools. If you encounter any problems or just have questions, the forum is always open at: forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=725&SiteID=1. In addition, check out Sachin Rekhi’s whitepaper titled “Database Unit Testing with Team Edition for Database Professionals” at msdn2.microsoft.com/bb381703. ■ 76 msdnmagazine Database Unit Testing http://msdn2.microsoft.com/teamsystem/bb507197 http://msdn2.microsoft.com/teamsystem/bb507197.aspx#schemacompare http://msdn2.microsoft.com/teamsystem/bb496794.aspx#TeamExplorer http://msdn2.microsoft.com/teamsystem/bb507197.aspx#datacompare http://msdn2.microsoft.com/teamsystem/bb496794.aspx#VersionControl http://msdn2.microsoft.com/teamsystem/bb507197.aspx#offlineprojects http://msdn2.microsoft.com/teamsystem/bb496794.aspx#WorkItemTracking http://msdn2.microsoft.com/teamsystem/bb496794.aspx#TeamPortal http://msdn2.microsoft.com/teamsystem/bb496794.aspx#ProcessTemplates http://msdn2.microsoft.com/teamsystem/bb507197.aspx#extensibleunittest http://msdn2.microsoft.com/teamsystem/bb496794.aspx#TeamBuild http://msdn2.microsoft.com/teamsystem/bb507197.aspx#datagenerator http://msdn2.microsoft.com/teamsystem/bb496794.aspx#Reporting http://msdn2.microsoft.com/teamsystem/bb507197.aspx#newtsqldesigner http://msdn2.microsoft.com/teamsystem/bb496794.aspx#DistributedTeams http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=725&SiteID=1 http://msdn2.microsoft.com/bb381703
For optimal viewing of this digital publication, please enable JavaScript and then refresh the page. If you would like to try to load the digital publication without using Flash Player detection, please click here.