Unit Test Generator

Free

Generates unit test code for methods in classes under test.

(44) Review
Visual Studio
2013, 2012
Download (83,316)
2/13/2015
1.3.14.510
View
E-mail Twitter del.icio.us Digg Facebook
Add to favorites
Description
Reviews (44)
Q and A (44)
Sign in to write a review
Sort by:

by TomEnglert | February 19 2015

Works great!

by TayBill | January 16 2015

Another thumbs up to test internal methods.

by dheijl | November 14 2014

Works as advertised for me. Thank you!

by 齐李平 | November 10 2014

A tool is very useful, but does not support Xunit2.0 beta

by Shimmy Weitzhandler | October 08 2014

by ssathya62 | October 01 2014

Love this. Use it all the time.

by Grant Duan | September 02 2014

it's usefull

by kjbartel | August 15 2014

Very useful extension not only adding back functionality which had been removed but also extending the functionality by adding in support for different testing frameworks. The biggest problem however is that it doesn't support generating tests for internal classes and methods. It should be rather trivial for this to be fixed and an InternalsVisibileTo attribue added to AssemblyInfo. Once that's been done then I'll give it 5 stars.

by RingDotNet | July 15 2014

AWESOME !!!

Finally something to replace the functionality that was removed from VS.
It does exactly what I need it to do. I installed it through VS's "Extensions and Updates" wizard and had no problems.
IMHO it works better than what was taken out of VS.

Thanks Guys for providing this functionality through an extension. I'll use it a lot.

by immeraufdemhund | May 21 2014

This simple tool makes adding unit tests for my classes a breeze. Especially when I am implementing a interface. Just create my class, implement the interface classes. Right click and generate all my tests.. then start knocking out my methods one by one good old TDD style. I love it. Great tool. I would how ever like to see something like Netbeans and IntelliJ to when generating tests in that they make a instance, a actual, and a expected variable for me. Granted it's not always right, but it's nice to have the majority of that put in. Just a thought.

by BlogTroll | May 07 2014

Does exactly what it promises, setting up the plumbing and creating one test method, or a test method for EVERY public methods of a public class. Obviously not the same as the discontinued feature, but then it states that clearly. It obviously assumes that you have reviewed the blog posts and documentation listed with the extension.

by Ojemzy | April 30 2014

Erm doesnt work at least on Express 2013.. 1 hr of trying.

Cant even upload image of pop-up error.


30/04/2014 20:27:24 - Searching for applicable products...
30/04/2014 20:27:24 - Found installed product - Microsoft Visual Studio 2010 Premium
30/04/2014 20:27:24 - Found installed product - Microsoft Visual Studio Express 2013 for Web
30/04/2014 20:27:24 - Found installed product - Global Location
30/04/2014 20:27:24 - VSIXInstaller.NoApplicableSKUsException: This extension is not installable on any currently installed products.
at VSIXInstaller.App.InitializeInstall()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()

Visual Studio ALM Rangers May 20 2014
| Edit |
Delete

As outlined in the release notes and documentation you require Professional or higher. Express is not supported.

by Bala Subra | April 24 2014

Must have in every dev env

by GBotros | April 16 2014

by Michael A. Duncan | April 16 2014

Works exactly as described. Compatible with Resharper

by smarty420 | April 03 2014

People who ever developed this plugin ,please don't call yourself a programmer. This is a useless tool that does nothing . Its a shame on MS , that they can't get a back cool feature that is needed by its developer community , even after two releases of visual studio.

by Bgardner21 | March 20 2014

It would be really nice if it picked up on the InternalsVisibleTo setting, and allow you to create unit tests for internal classes in the project. Aside from that, it works well.

by bsolomon | March 20 2014

Better than nothing. All the positive ratings here must be from those
who do not know or remember the vs2010 version.

The original version would create test cases with a template call to
the method under test, AND would also allow you to create test cases
(with calling stubs) for EVERY method in a class, not just one at a time.

by AAAZ | March 09 2014

Terrible....

Who's idea was to remove from VS 2013 "Create Unit Test"?

This solves nothing. It does not create the auto code generated that
we enjoyed on VS 2010,12

VS 2013 Testing features has gone back in time 10 years.

by Atrejoe | March 05 2014

Thanks for restoring this functionality to Visual Studio!
Nice to haves:
- Register keyboard shortcut upon instllation, like ctrl-U(nit)-T(est)
- Add Xml comments to generated code.

1 - 20 of 44 Items   
Sign in to start a discussion


  • Show me the box
    1 Posts | Last post Tue 10:04 AM
    • I unfortunatly activate the "not show me again" (or something like that...) on the parameter box who pops when you do a right-click -> generate unit test. Someone knows how to re-activate it ?
      
      Thanks :)
  • Target Framework not set
    2 Posts | Last post February 03, 2015
    • If you try to generate a unit test for a project targeting 4.5.1 where no unit test project currently exists, the generated test project targets 4.5 and is therefore unable to reference the code being tested.  I have to change the target framework manually.  It would be good if the target framework were copied from the source project.
    • As it doesn't look like the authors are posting here at the moment, a workaround for the project target framework version is to modify the default Visual Studio project template for unit tests.  This is located at C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\ProhectTemplates\CSharp\Test\1033\UnitTestProject\UnitTestProject.csprj (you may need to change 1033 to be your language code).
      
      Originally this file contains:
      <TargetFrameworkVersion>v$targetframeworkversion$</TargetFrameworkVersion>
      
      You can change it to target your framework version, but be aware that any project created manually will now have this version too:
      
      <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
  • Unit Test for SSIS package, and Name changing in Database
    1 Posts | Last post December 28, 2014
    • Does anyone know how to create a unit test for SSIS package for other developer using while they changing the column names in Database?
  • Version for VS 2015
    1 Posts | Last post December 03, 2014
    • Any chance to get version for VS 2015 preview?
  • Generate Unit test does not show in menu
    3 Posts | Last post November 27, 2014
    • Hi, I have downloaded the extension, my VS is 2012 update 4, opened my project when positioning cursor on a method, right click, I do not see the generate unit test item in the menu.
      I changed the method to public, still can not see the item. I checked the nugget manager, it is right there in the installed packages
      Thanks for your help
    • I have the same problem. "Generate Unit Test" does not show up in menu. I have VS 2012 update 3. I just installed the latest Unit Test Generator, 1.3.14.510. I created a new console project and tried right clicking inside the the programs's "Main" function -- no Generate option. I tried creating another public method -- again no option. I tried first creating a test project for this project - still no option. I tried, as someone suggested, building the project first -- still nothing. I tried many other things - no option.
      People have been asking this same question in this forum since July. NO-ONE has responded with any possible help.
    • I think I found the answer. I tried various project types: Console, Forms, WCF, Class library. The option finally showed up in a Class Library. When I was searching for more articles, I also found this: http://blogs.msdn.com/b/willy-peter_schaub/archive/2013/07/19/exploring-the-unit-test-generator-vs-extension-v1-rc.aspx
       His instructions start by telling us to create a Class Library. However neither the release notes nor the Quick Reference Unit Test Generator Overview had mentioned that it only works for a Class Library.
       
  • No 'Generate Unit Test' in my dnn vb.net solution
    1 Posts | Last post October 14, 2014
    • No 'Generate Unit Test' in my DNN vb.net solution
      but it's there in my c# wcf solution.
  • Generate Unit Test Output Project not recognized
    2 Posts | Last post October 10, 2014
    • Hi,
      
        I have upgraded extension for few times and every time I upgrade I loose "connection" to my output projects in solution. So I can't pick from my existing unit test projects but I have to create a new one and then move the generated file to proper project.
      
      Did anyone has this issue or any kind of workarounds ?
      
      Thanks
    • Did anyone encountered this issue, right now it's impossible to generate new tests as I have to create a new project for every generation ?
  • In 2010 in generated
    1 Posts | Last post September 18, 2014
    • I don't find this tool that useful if it doesn't autofill the params for the method it is testing. Also, it should make assumptions on what you will asset. If the method returns a bool assert that the response should be true. If it should be false that is a small change the developer can make.
      
      This is a small step up from copying and pasting an existing test method and renaming it. Please consider adding the auto-gen that 2010 had. At minimum for VSTest.
      
      Thank you.
  • You know what would be cool?
    2 Posts | Last post September 09, 2014
    • T4 template generation option.   I would like to reference a code generator for templating my unit tests.   
    • Add... doesn't have menu items.  I have the "Configure Unit Test Generation..." menu item under test, but I am unable to create a project where I can right click on ANYTHING in it and get the options to generate my tests... this worked in previous versions...
      
      Microsoft Visual Studio Premium 2013
      Version 12.0.30501.00 Update 2
      Microsoft .NET Framework
      Version 4.5.51641
      
      Installed Version: Premium
      
      LightSwitch for Visual Studio 2013   06191-004-0454001-02566
      Microsoft LightSwitch for Visual Studio 2013
      
      Office Developer Tools - May 2014 Update ENU   06191-004-0454001-02566
      Microsoft Office Developer Tools for Visual Studio 2013 - May 2014 Update ENU
      
      Team Explorer for Visual Studio 2013   06191-004-0454001-02566
      Microsoft Team Explorer for Visual Studio 2013
      
      Visual Basic 2013   06191-004-0454001-02566
      Microsoft Visual Basic 2013
      
      Visual C# 2013   06191-004-0454001-02566
      Microsoft Visual C# 2013
      
      Visual C++ 2013   06191-004-0454001-02566
      Microsoft Visual C++ 2013
      
      Visual F# 2013   06191-004-0454001-02566
      Microsoft Visual F# 2013
      
      Visual Studio 2013 Code Analysis Spell Checker   06191-004-0454001-02566
      Microsoft® Visual Studio® 2013 Code Analysis Spell Checker
      
      Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.
      
      The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.
      
      Windows Phone SDK 8.0 - ENU   06191-004-0454001-02566
      Windows Phone SDK 8.0 - ENU
      
      ASP.NET and Web Tools   2013.2.50425
      Microsoft Web Developer Tools contains the following components:
      Support for creating and opening ASP.NET web projects
      Browser Link: A communication channel between Visual Studio and browsers
      Editor extensions for HTML, CSS, and JavaScript
      Page Inspector: Inspection tool for ASP.NET web projects
      Scaffolding: A framework for building and running code 
  • So non-public methods are always perfect?
    1 Posts | Last post August 17, 2014
    • Add me to the increasingly massive list of people to ignore who are asking to test non-public methods. It would be nice to not have to find-replace everything with "public" just to work around your dogma.
      
      Seriously, at least provide a reason for this.
1 - 10 of 44 Items