TDD and SQL Express

time to read 1 min | 111 words

Testing against a database is usually a problem, but I run into an unusal one today. My tests would all fail, saying that they couldn't connect to the database. I checked the connection string, and then try to connect using VS 2005, and it worked. When I run the tests again, they got the database and run properly.

The only thing that I think of that can cause that is if SQL Express wasn't running when I run the tests the first time, and when I accessed the database in VS 2005, it checked for that and started the database.

Strange...