posted on Thursday, August 12, 2004 8:02 AM
by
Benjy
NUnit Add-In responses
I got an immediate response from Jamie Cansdale about the NUnit Add-In issues I mentioned in my last post. Here's a brief summary of his points and my follow-up in case you are interested
(1) Project Item Templates : Jamie will be working on getting the project item templates to work correctly. This is great. It is quite a time-saver. I looked at Enterprise Templates briefly to see if i could quickly code one up but discovered its not for the faint of heart. Need to spend more time understanding it first. But then again, its supposed to be much much easier in Whidbey with Project Templates and Project Item Templates (I read this in a post somewhere on MSDN - can't remember where) so maybe it would be better to just wait a little while more.
UPDATE: I found the post. Jeremy Bostron has also clarified (in response to my question) that it is not intended to replace Enterprise Templates.
(2) Debugging Issues: What was I actually trying to do with the console app stuff and all that ? Basically, I have all my tests in a separate project in the same solution. The namespace is just <application-namespace>.Tests. Now because of all the problems I have had with trying to setup config files for DLLs, I have set the project output to be a console application. In each of the tests I am trying to do a Test with..debugger and no matter how many breakpoints I set in the test class methods, it jumps past all of them and goes straight into the main class I am testing. I tried re-setting the output to be a DLL and lo and behold, the step through within the test class worked fine.
(3)Config Files for DLLs: Jamie suggested I use the method where I create a config file for the DLL and name it "[application].dll.config". This should then be placed in the bin directory along with the DLL. I have read about this approach in lots of places in the past and tried this lots of times and it didnt work at all. Thats why I gave up and placed all the configuration data for the main DLL in the registry and put the EMAB stuff in the app.config for the Test executable.
Anyway, I'm able to make progress for the present. Took a look at Scott Mitchell's EMAB Custom DB Publisher and used the idea to roll my own DB publisher. That worked fine.
I also saw some other interesting looking applications on the sourceforge page for NUnit including one called VSNunit and one for pretty test reports. Must try them out.
Also came across a cool article on Enterprise Connection String management. Just saw it recently and it lays out a lot of the issues clearly. Its a discussion, not a solution so check it out and contribute if you can.