The VS Auto Unit Test Generator helps to increase developer productivity by decreasing the setup work involved in creating new unit tests. It takes away the routine test creation tasks allowing a developer to focus on the highest value, writing the test itself.
VS Auto Unit Test Generator provides the ability to generate and configure a test project, test class, and test stub to enable you to get to write your test sooner. It provides a set of configuration options that allow you to tailor the generation to match your naming and organization schemes. It is also fully configurable to support MSTest, XUnit, and NUnit so that you can choose the framework that is most suitable in your environment.
The team embraced the following principles when they designed and developed the extension:
- Achieves a moderate amount of restoration of Visual Studio 2010 feature functionality.
- Replaces and does not resurrect the old command.
- Supports .NET MS-Test, NUnit and XUnit Test Frameworks and generation of VB/C# test code.
- Presents a “reference implementation” of how to do this for a particular test framework.
- Provides a basic infrastructure and an extension point.
- It focuses on project and reference management and not on code generation.
Once installed, you will find the extension under Extensions and Updates in the Tools menu.
Right-click in your method to select Generate Unit Test.
This generates a test project and a test class—if needed—then adds the references, the namespace, and the test methods.