That is actually one of the 'THE' key questions, since if we want to be able to create NUnit tests that use newly created Cassini-driven websites (i.e. a new Cassini server per test or test class) they have to be fast.
Ok, so how 'fast' is fast?
Well, in my book, that is either less than 1 second (for quick tests) or 10 seconds (for more complex setups).
More than that, and it is not practical to run those tests from NCrunch (or even manually via Resharper/NUnit-GUIs)
The good news is that (as you can see below), I was able to execute an 'NUnit-Cassini-driven' test in:
- 6 sec: via NCrunch (consuming a TM instance with 0 libraries)
- 7 sec: via ReSharper (consuming a TM instance with 3 libraries)
I'm not sure how much more I can shave off these timings, since there is the 'small matter' of a full ASP.NET stack (via cassini) being loaded in that time (which is something I don't have much control over).
Here is the UnitTest that was executed
Basically the code shown above (see gist here) is checking that we can get and modify the live TM's TMConfig object
Here are the execution timings of NCrunch:
Here are the execution timings of ReSharper:
To confirm that we did had a live instance of TM running, I added this to the end of the NUnit test
... which opened this window (when executed via NCrunch):
... and this window (when executed via Resharper)