[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Unit Testing with local version of database (Visual Studio, SQL Server).

Posted on 2009-05-19
1
Medium Priority
?
691 Views
Last Modified: 2013-12-13
At our company, we have a solution that has a project and a unit testing project.  We have a unit teting database set up that we use to test the project.  We have standard data that we have in the unit testing database at all times, and if our tests fail or change the data we reset the testing database.  All of the testing of the data in the unit tests is done my coding the values we expect, so the data in the database must have those values.  

Now, however, we are creating some additonal projects that we also want to unit test, but we have different data needs for each one and they will use the same database schema as the other.    Basically we need more data.  But if we add it to the unit testing library, then we will have to change many of our tests.

What I'd like to know is there a way to have a "virtual" database that would exist on our local computers, that we could intialize to what ever data we needed for what were are testing.  It would have to be something that would pick up an changes made to the unit testing database, new files, stored procedure etc.  

We are using SQL Server 2008, Visual Studio 2008 Team System and devleoping in C#.
0
Comment
Question by:weimha
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 43

Accepted Solution

by:
pcelba earned 2000 total points
ID: 24427927
Each computer can contain several instances of SQL Server and each instance can contain several databases. The application setup should allow SQL Server instance/database selection so you can have several independent testing environments.

Each SQL Server instance must be installed separately.

In addition to above facts you may create several Virtual PCs on your computer and install SQL Server on them. Virtual PC has an advantage of independent environment which allows to decide what to keep and what to revert back after each virtual session.

Several databases in one SQL Server instance should be enough for testing. Each application/tester can use its own database. You have to be ready for occassional restores from backup copies.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article was originally published on Monitis Blog, you can check it here . If you have responsibility for software in production, I bet you’d like to know more about it. I don’t mean that you’d like an extra peek into the bowels of the sourc…
Here in this article, you will get a step by step guidance on how to restore an Exchange database to a recovery database. Get a brief on Recovery Database and how it can be used to restore Exchange database in this section!
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question