Prohibitive build times when creating unit tests in Visual Studio 2008
Posted on 2009-12-22
We want to move to grown up automated unit testing with our existing application. Our development environment is Visual Studio 2008 (.net 3.5) so I've been investigating using the on board unit testing (we may also look at Nunit but a one-stop-shop currently makes more sense).
Our existing application suite is a 'portal' web app housing 'applications' (i.e. within the web app folder structure, we have a folder for classes, a folder for core code and a folder per set of 'application' web pages - i.e. nothing unusual, as far as I'm aware).
The functionality consists of web pages embedded into nested master pages and referencing the shared class namespaces. The site currently contains 857 code files of varying descriptions. Most file sizes are a few KB, with the biggest single file being 175KB.
I'm able to create unit tests to test the web pages and also unit tests to test classes/methods etc. but the build time every time I make the smallest of changes is SOOOO slow as to be prohibitive. There's no point in writing unit tests if its going to take ten minutes to rebuild every time I hit "run test".
Can anyone point me in the right direction for getting this overhead down? We can't seriously use the testing facility as is.
(NB if I create a clean baby website with one page and a class file and then create unit tests for this, it runs at super-speed, so our issues are clearly to do with the size/configuration of the web project)