user235307
user235307

Reputation: 31

C# Unit Test Generation

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?

Upvotes: 0

Views: 589

Answers (4)

Al.exe
Al.exe

Reputation: 483

Disclaimer I work at Typemock.

Typemock has a feature called Suggest. It analyzes you uncovered code and creates unit tests where you don't have any. You can edit the test suggestions (refactor and personalize) and then just click save.

Upvotes: 0

Mark Ewer
Mark Ewer

Reputation: 1835

I don't think the generate unit test function of Visual Studio is available in the Professional version. You need Team Developer edition, Team Tester edition or Team Suite edition.

You may want to look into PEX instead. It works in Professional just fine.

Upvotes: 1

itowlson
itowlson

Reputation: 74832

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...!

Upvotes: 0

GrayWizardx
GrayWizardx

Reputation: 21201

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.

Upvotes: 0

Related Questions