When you create database test in a MsTest project, usually it configure an initialization method that deploy the database schema before test runs.

[AssemblyInitialize()]
public static void IntializeAssembly(TestContext ctx)
{
//Setup the test database based on setting in the
//configuration file
DatabaseTestClass.TestService.DeployDatabaseProject();



kick it on DotNetKicks.com

Continue reading about Failed to deploy database project error during database testing