Thursday, April 24, 2008

When your testing environment is not cutting it

I was so surprised the other day when I discovered that despite the whole kitchen-sink testing setup (NUnit, selenium, Cruise Control) part of my application was using a fixed connection string in the TableAdapter I've created using VS2005.

I had a connection string in the Properties > Settings (called ConnStr) but I never noticed that its fully qualified name was something like ProjectX.My.Settings.ConnStr. When I added a ConnStr to my connectionStrings section of web.config I thought that all would be well. Obviously everything was working since I kept on testing on the same machine on which I develop and hence my development database was there.

Anyways, I wanted to see whether an installer would work properly so I started a VMWare Win 2003 server instance and discovered that the application was trying to connect to my development database on the server. That was a bummer...

OK, so I admit that it must be that one or two of my tests are definitely not up to speed since they ought to have been able to catch this, but I kind of discovered what a great thing a completely dedicated testing machine is. Hm, no wonder people keep on stressing that.

No comments: