Willy's Reflections

| Willy-Peter Schaub | In search of IT simplicity, quality and tranquility

Unit Test Generator v1.3 and a chat about its origin and future

Unit Test Generator v1.3 and a chat about its origin and future

  • Comments 4

We are pleased to announce that the v1.3 of the Unit Test Generator has shipped. It is a bug-fix revision and does not introduce new features.

why bug fix?

This bug fix release addresses and resolves an elusive gremlin: Bug 9814: Unit test generator breaks nuget [vsarguidance: 20485] and finally brings us to a zero (0) bug count.
image
Fix: We no longer include NuGet assemblies in the vsix.

so, what’s the intent and plans for this extension?

We often get the question as to why the unit test generation feature was removed from the product and why this extension does not replicate the features from the previous product feature. Let’s try to find some answers.

There was a change in architecture to support multiple unit testing frameworks, and with Visual Studio 2012 and 2013 we got support for third party unit testing frameworks. See http://msdn.microsoft.com/en-us/library/hh704261(v=vs.110).aspx#whatsnewtestingunittests for more information. Using the Unit test Generator extension you can now generate NUnit and XUnit unit tests as well as MSTest unit tests.

There is no debate that the Rangers extension is simpler than the original feature, but arguably supports the most useful functionality. In Unit Test Generator under the bonnet (hood) … aka vsarUnitTestFx we were very transparent with our project principles and vision, highlighting that we are not resurrecting the old command or its features.

Will there be a v2? It depends what we hear from the ALM community (you). We need to ensure a need,  business value and alignment with the product group plans for the product.

reference documentation

feedback

We can’t wait to hear from you, learn more about your experience using the extension and hear your thoughts on “what next”.

Here are some ways to connect with us:

  • Add a comment below.
  • Ask a question on the respective Gallery discussion forum.
  • Contact me on my blog.
  • The original unit testing feature in 2010 was great, and allowed us to easily start generating and working with unit tests. The new feature is not as good, it would be great to have all the functionality that existed in the original feature.

  • This shows a lot of promise, particularly the mention of a T4 or template approach for generating some of the boilerplate. If this isn't going to be updated, is there any chance that the code can be released so the community can leverage it?

  • I am sure that this will be very useful (which is why I bothered to install it), but something that I am still having trouble with is creating a Unit Test Project for my Portable Class Libraries that target Windows Phone 8.1 and Windows 8.1. When I attempt to use this extension to create a Unit Test Project for the methods in this Portable Class Library, I have problems. I won't go into any more detail, because I am new to both Unit Tests and Portable Class Libraries, but I will say that my Portable Class Library has worked fine for almost a year, but when I add .NET Framework 4.5.1 as a target, it will not compile, which is why I was having trouble creating a Unit Test Project and hoped the Unit Test Generator could help.

  • The current VS2015 Preview has a feature called "Smart Unit Test" that purports to analyze your code and generate a slew of unit tests to give 100% code coverage. A very laudable aim but doesn't work for the "Getting Started Code Sample Using the Prism Library 5.0 for WPF" codebase. Specifically I get

    System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

    at an attribute that decorates

       [module Microsoft.Practices.Prism.Composition.dll]

    which is a PIA. If MS ever get this Smart thing working for everything, I suppose it would supercede this ALMRangers item. However for now looks immature alas.

Page 1 of 1 (4 items)
Leave a Comment
  • Please add 6 and 2 and type the answer here:
  • Post