Unit Test Generator

Free

Generates unit test code for methods in classes under test.

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

by chandrakopparthi | August 20 2015

Hi,

I am not able to install Unit Test Generator. I have visual studio 2013 Ultimate on Windows 10.
I am always getting "Required .NET Framework version is not installed error" ;and not able to proceed further to install the Unit Test Generator.

I have tried the solutions provided in the Q&A, close the visual studio, download vsix and install, this is not working for me.

I have tried on other box also, the same issue.

Could you provide a way to install Unit Test Generator?

Thanks

by Farukh Sharipov | June 23 2015

Is it possible for simple function(s) such as:

public bool Foo(double x, double y)
{
return x == y;
}

that Unit Test Generator would check function signature and create unit test for you such as.

[Test]
public void FooTest()
{
double x = 1;
double y = 2;
SomeObj = new SomeObj();
bool result = SomeBj.Foo(x, y);
Assert.IsTrue(result);

}

At first just support simple functions and classes
This would bring Unit Test Generator to next level.

by killerkenshin | June 16 2015

'require a version of the .NET Framework that is not installed'. But I don't know which version!

by Ziv Nitzan | May 28 2015

Works Great.
Needs support for internal classes too.

by leeeeeee | April 29 2015

yeah,very terrible tool
always create now project to unit test?

by Tak1wa | April 09 2015

This extension is very good. I was looking for this feature of Visual Studio 2010.
I have a request. And automatic extraction of Private method, I want you to be able to create stub by Reflection.

by MaxKeystroker | March 13 2015

Sorry, had to deduct 2 stars...

- Lack of support for internal classes, that was supported in the original VS functionality (along with setting the internalsvisibleto() attribute)

- The unit test created required renaming.

I know creating a true unit test generator is impossible... you should be creating the unit test first. But it would be nice if the code exist, creating tests based on symbols, known patterns, ect. Support for WF unit testing would be nice as well.

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

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


  • install Unit Test Generator failes
    3 Posts | Last post Mon 8:16 PM
    • log:
      正在开始将扩展安装到 Microsoft Visual Studio Ultimate 2013...
      2015/8/4 15:50:38 - 安装错误: Microsoft.VisualStudio.ExtensionManager.MissingTargetFrameworkException: 扩展“Unit Test Generator”需要的 .NET Framework 版本没有安装。
    • I was facing the same situation and I solved it by: 1 close VS; 2 download the extension file(vsix); 3 installed it.
      then you open VS and will find the Generate Unit Test option.
    • This install continually failed for me on Windows 10 indicating I did not have the required .Net framework installed. I tried closing VS and installing the vsix file by directly executing the downloaded file, but this still failed.
      
      I eventually got this to work by installing the VS 2013 Update 5 package. Then I was able to install the vsix file without any further errors.
  • Installing failure about .netfrmework
    3 Posts | Last post August 10, 2015
    • When i installed the GenerateUnitTest.vsix into Visual Studio Ultimate 2013, there was an installing failure:          扩展 “Unit Test Generator” 需要的.NET Framework版本没有安装。  
      Is there any nice friend giving a solution, very thanks!
    • I had done the three steps as killerkenshin said, there was still have the same issue...
      3 steps: 1 close VS; 2 download the extension file(vsix); 3 installed it.
    • 2015/8/10 19:20:02 - Microsoft VSIX Installer
      2015/8/10 19:20:02 - -------------------------------------------
      2015/8/10 19:20:02 - Initializing Install...
      2015/8/10 19:20:02 - 扩展详细信息...
      2015/8/10 19:20:02 - 	Identifier      : 13373ac4-7f04-4c7e-a9a7-2bd33349b323
      2015/8/10 19:20:02 - 	Name            : Unit Test Generator
      2015/8/10 19:20:02 - 	Author          : Visual Studio ALM Rangers
      2015/8/10 19:20:02 - 	Version         : 1.3.14.510
      2015/8/10 19:20:02 - 	Description     : Generates unit test code for methods in classes under test.
      
      2015/8/10 19:20:02 - 	Locale          : en-US
      2015/8/10 19:20:02 - 	MoreInfoURL     : http://aka.ms/treasure50
      2015/8/10 19:20:02 - 	InstalledByMSI  : False
      2015/8/10 19:20:02 - 	SupportedFrameworkVersionRange : [4.5]
      2015/8/10 19:20:02 - 
      2015/8/10 19:20:03 - 	SignedBy        : Microsoft Corporation
      2015/8/10 19:20:03 - 	Certificate Info : [Subject]
        CN=Microsoft Corporation, OU=MOPR, OU=OPC, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
      
      [Issuer]
        CN=Microsoft Code Signing PCA, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
      
      [Serial Number]
        33000000CC776171D4B17BA1280001000000CC
      
      [Not Before]
        2014/4/23 1:39:04
      
      [Not After]
        2015/7/23 1:39:04
      
      [Thumbprint]
        9DD77A79F7124D8DB128A526833CF3760FCB7794
      
      2015/8/10 19:20:03 - 	支持的产品           : 
      2015/8/10 19:20:03 - 		Microsoft.VisualStudio.Pro
      2015/8/10 19:20:03 - 			Version : [11.0,13.0)
      2015/8/10 19:20:03 - 
      2015/8/10 19:20:03 - 	引用              : 
      2015/8/10 19:20:03 - 		-------------------------------------------------------
      2015/8/10 19:20:03 - 		Identifier   : Microsoft.VisualStudio.MPF.11.0
      2015/8/10 19:20:03 - 		Name         : Visual Studio MPF 11.0
      2015/8/10 19:20:03 - 		Version      : [11.0]
      2015/8/10 19:20:03 - 		MoreInfoURL  : 
      2015/8/10 19:20:03 - 		Nested       : No
      2015/8/10 19:20:03 - 
      2015/8/10 19:20:03 - 
      2015/8/10 19:20:03 - 正在搜索适用的产品...
      2015/8/10 19:20:03 - 找到的已安装产品 - Microsoft Visual Studio 2010 Professional
      2015/8/10 19:20:03 - 找到的已安装产品 - Micro
  • Version for VS 2015
    2 Posts | Last post July 26, 2015
    • Any chance to get version for VS 2015 preview?
    • The feature has been rolled into VS2015 and we therefore have no plans to enhance this extension or support it on 2015.
  • MSTest OS compatibility
    1 Posts | Last post July 08, 2015
    • Hi there,
      
      I want to run unit test/ MSTest in my team builds using Windows 2012 R2 build server. Can I run mstest commands on windows 2012 R2? is it compatible?
      
      The VS version is 2013.
      Thanks in advance.
  • Show me the box
    2 Posts | Last post June 16, 2015
    • 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 :)
    • Under the 'TEST' tab you can edit the settings for Unit Test Generator.
  • NSubstitute should be apart of Unit Test Generator
    1 Posts | Last post May 30, 2015
    • I have been working with my team and we have come across NSubstitute, found it to be a great testing framework. I would love to see it in the Unit Test Generator and would like to know if there are any plans to have it included?
  • 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?
  • Generate Unit test does not show in menu
    3 Posts | Last post November 26, 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.
1 - 10 of 48 Items