Seth Spearman
Seth Spearman

Reputation: 6780

Does anyone know of a tool that will auto-generate Unit Test stubs?

I am writing a winforms application and eventually I would like to write unit test for this application from the DAL, and Biz Objects layers etc.

Does someone know of a FREE tool that can recieve the path to an assembly and then output unit test stubs with matching signatures for the assembly.

Any configurable options like "public interfaces only", "test framework choice", "language choice" would be a plus.

I at least would need this tool to emit vb.net against nunit.

Thanks.

Seth

Upvotes: 2

Views: 1282

Answers (4)

redtuna
redtuna

Reputation: 4600

There is a tool called Pex that not only makes the stubs, but also fills in tests for you. There's also a video online.

edit: Mark Seemann beat me to it! Hopefully the links are still useful.

Upvotes: 0

Mark Seemann
Mark Seemann

Reputation: 233150

Take a look at Pex from Microsoft Research.

Upvotes: 1

Maciej
Maciej

Reputation: 10805

MS Unit test build into VS2008 can create stubs (using Reflection) in your behalf.
I found it very useful in most cases.

Upvotes: 0

mezoid
mezoid

Reputation: 28710

Last I heard, the recommended method of unit testing was to write them as you develop the functionality in a test first style. Auto-generating unit test stubs, in my mind, would just result in a whole bunch of unimplemented unit tests which add no value and will most likely have very awful generic names that don't describe the behavior being tested.

On the other hand, maybe I'm just misunderstanding your question...

Upvotes: 1

Related Questions