Object Test Bench Issue

mskeel

Senior Contributor
Joined
Oct 30, 2003
Messages
913
I've been having some trouble firing up the new Object Test Bench feature in VS2005. I had it up and running yesterday, but now I can't seem to be able to get it to crank up again. All I did yesterday was right click on the class I wanted to test from the class view window and selected "Instantiate object". Then a whole bunch of great stuff happened and I was able to run individual methods with break points and the whole shebang. It was just like test driven .net but native.

Anyway, that's all fine and great, but I can't figure out how go get it back. Any help is greatly appreciated. Are there tricks that I could have done accidentally and need to do again? I'm sort of at a loss.
 
I hate it when this happens, but I just just found the solution. After exhausting the MSDN2 help I posted here. Then I decided to try the "Community"->"Ask a question" menu item. That brought me to a Microsoft Forum where a guy made side comment about ASP.Net:
dsandor said:
In summary, you need to set your startup project to a class library or an executable instead of an ASP.NET project. Then the create instance menu items become available and you can use the OTB.
It turns out (at least as far as I can tell) that you can only use the Object Test Bench on your current startup object. That means that if you are trying to test a library, like I was, that isn't your startup object, the context menu items will not show up. Yesterday I just happened to choose the library that was my startup object. Whew, I'm not crazy.

That's a little annoying but at least you can test stuff natively, even though you have to swap your startup object around to get full coverage. I wonder why they decided to do it that way? I might end up just going back to TestDriven.Net, but I'll give this a whirl and see how it goes.
 
Back
Top