Bringing you news, technical articles, and other useful content about Visual Studio ALM and Team Foundation Server
More videos »
One of the things I’m really proud of in the new Visual Studio 11 developer experience is the investment we made in developer and unit testing. We first started talking about this back at the //BUILD/ conference, and since then have spent a lot of time working with community partners to get them ready for the Beta release today.
I’m very happy, therefore, to be able to highlight the frameworks & test runners that have shipped support for VS11 Beta. (More to come, see below.)
I will be maintaining this list as more come online, so please stay tuned. If you have one, or know of one, either in-development or released, please let me know.
How do i switch between frameworks and is it possible to switch in Vs11 web express?
What about unit test support for Windows Phone? Does it come with VS11 or do we need some tricking to get something to work? An easy way is very welcome!
Will TFS build process support these (running and reporting of results) from the box as well?
@Peter: When you install a testing framework plugin, it adds that capability to VS. You don't need to switch between them. I have MSTest, xUnit, NUnit and JS all installed on my machine and they co-exist quite nicely together.
@Peter: The express SKUs do not support non-MSFT extensibility, so you can't use 3rd party frameworks in Express. Sorry.
@Ralf Ehlert: We don't currently have a plugin for unit testing phone, but it is something we're looking at.
@Ivan: Yes, these work just fine on the build server. You can read Aseem's blog post (his method #3) that explains one way to get that done. blogs.msdn.com/.../how-to-make-your-discoverer-executor-extension-visible-to-ute.aspx
The idea is good but the implementation....
I have waited a long time for the beta for this feature - and now I cant use it because it does not support 64 bit.
Also I couldn't get assertEquals to tell me the expected/actual numbers - a feature I have never missed in any other framework.
Also there seems to be no Refactoring support at all for C++ - can not even rename a Variable!
Seems that C++ developer experience had not much priority...
Hopefully I've missed something, but I find the unit test framework (the built-in for c#) in VS11 nearly useless. Let me explain:
1. In VS2010 I could right click in a test and select Run Unit Test from the context menu (or CTRL+R + T) and ONLY that test would be run. In VS11 that option is gone and if I use the shortcut ALL tests are run!! All unit tests, all integration tests, all coded GUI tests!!
2. If i used CTRL+R + T (or right clicked and selected run unit tests) in a file that contained tests all tests in that file would be run. In VS11, there's nothing like this - it's all or nothing.
So at first I thought the unit test explorer search box would help me, but that one isn't exactly smart. I have yet to find a way to run all tests withing a class.
A few idea for the search box:
1. If I search for a class name, all tests withing that class should be found (independent of nesting hierarchy), see phil haack's example of how to structure unit tests (haacked.com/.../structuring-unit-tests.aspx)
2. If I use the TestCategory attribute, make it possible to search for a category and all tests in that category show up. (And best of all if we don't need to use some weird Category= prefix or such.)
PS. I will probably still miss the possiblity to run a single unit test -- the one I'm writing by doing CTRL+R + T. DS.
The "Run Tests After Build" feature sounds nice too, but as long as it's gonna run my integration and GUI tests, that feature feels kinda useless too. Run all tests in a specific category, or based on some search criteria perhaps?
Otheriwse, awesome work on VS11!
Hey, I really apprecheate the new features. But it seems to me that the new test runner is worse in terms of performance. A simple test suite with 38 Tests all inmemory takes more than double the time than in vs 2010.
Can anyone conform this?
Thanks for the feedback. The Assert messages in C++ is a known bug and the team is working on it. I will forward your other comments on C++ unit testing to them.
Regarding the IDE integration you mention in your second comment, I think I discussed most of your comments at the bottom in my other post here:
The short answer is, we agree with all of it and are continuing to work on it. We have a bunch of stuff in the works and will continue to enrich this experience over time.
@Michael, see the same link I posted for Martin. We know about the startup performance issues and are working on it actively.
I've heard a lot of great things about MS embracing open source lately, but wouldn't supporting OSS unit testing frameworks in Express be the most basic thing you'd think of supporting?
Can I integrate with my own testing framework?
@Gaffo, yes you can. The best way to see how the API works is to look at the source for the frameworks listed above.
Thanks for the information!
Since this list was the first thing I found when I started to look at developing a custom unit test adapter (thanks!), it is fair to announce that one can get my unit test adapter for C++ tests written against Google Test (gtest) at visualstudiogallery.msdn.microsoft.com/f00c0f72-ac71-4c80-bf8b-6fe381548031 !