I know it is possible for VS 2008 to generate unit test code to test C# classes, but I cannot find the right sequence of mouse clicks to generate the code. Any help?
A:
I have Visual Studio 2008 professional installed. I just need to right-click on a function or class name and select "Generate Unit Tests" from the popup-menu.
GrayWizardx
2009-12-19 23:28:31
That option is not available to me. I am running VS 208 Professional Edition version 9.0.210022.8, and when I right click on either a class or a project containing only classes, there is no option to create unit tests. Any idea where this option may live?
2009-12-19 23:46:09
Microsoft Visual Studio 2008 - Version 9.0.30729.1 SP, all relevant hotfixes installed. I did not do anything special, and according to the docs this is by-default behaviour in VS professional: ms-help://MS.VSCC.v90/MS.MSDNQTR.v90.en/dv_vsetlt01/html/4e5d85db-2a9f-4f31-acc9-a2aebd14eac3.htm
GrayWizardx
2009-12-19 23:53:21
A:
For me, if I right-click a class in the editor, there's a Create Unit Tests option in the popup menu. (Near the top, just below the Organise Usings flyout.) I don't think I customised it so hopefully it's also there in the default menu layout...!
itowlson
2009-12-19 23:28:49
That option is not available to me. I am running VS 208 Professional Edition version 9.0.210022.8, and when I right click on either a class or a project containing only classes, there is no option to create unit tests. Any idea where this option may live?
2009-12-19 23:44:02
Hmm, it's possible the test components aren't installed. Do you see a Test menu in the main menu bar? If so you can get there via Test > New Test > Unit Test Wizard.
itowlson
2009-12-19 23:53:20
You can check the installation status by rerunning the installer from Control Panel, selecting add/remove features and looking under Team System Developer Tools.
itowlson
2009-12-20 00:01:38