How can I continuously run unit tests in Visual Studio 2012 Professional?
Asked Answered
H

4

24

Visual Studio 2012 added a "Run tests after build" button in the Unit Test Explorer, but it seems that option is not available in the Professional edition. In fact, my "Unit Test Explorer" is just called "Test Explorer", and doesn't have that button at all:

Screenshot of Test Explorer window

Are there any extensions which can replace this missing feature? Something that integrates with the existing test explorer UI would be ideal. (Free options are also preferred, since if I could convince my corporate overlords to shell out for VS Ultimate/Premium, this wouldn't be an issue anyway)

Huertas answered 21/11, 2012 at 17:1 Comment(0)
C
27

I remapped my F6 key to TestExplorer.RunAllTests instead of the default of Build.BuildSolution

Build.BuildSolution gets remapped to Ctrl-Shift-B when you do that.

It works well because now my F6 reflex RunAllTests saves any modified files, builds my solution and runs my unit tests.

The only thing I had to change is my window layout so that I can see the Test Explorer Window, that way I know if any tests failed.

Updating the answer with a link to a blog I wrote about this

Carswell answered 15/7, 2013 at 12:42 Comment(2)
This approach is saving me a bunch of time. Thank you.Endothermic
If the site is down, an archived page is available @ web.archive.org/web/20161007013353/http://jason.learmouth.caKaden
P
20

The "Run Tests After Build" and "Profile Test" features are available in Premimum and Ultimate editions of Visual Studio 2012.

Piranesi answered 21/11, 2012 at 21:39 Comment(2)
I had no idea!... and there it is, the option on the Test menu staring me in the face...Escharotic
This continues to be true for 2015 - available in Enterprise only - msdn.microsoft.com/en-us/library/hh270865.aspxMufti
C
9

NCrunch is not free but it's well worth the money and superior to any and all test running features in Visual Studio, regardless of edition.

Cemetery answered 22/11, 2012 at 6:30 Comment(3)
I have been using nCrunch since early betas. Just recently my trial period ran out. My company is working on getting us licenses, but it's a slow process. I tried MightyMoose and Test Explorer, but neither one compares. nCrunch FTW!Darceydarci
The link In this answer refers to NCrunch.com, which has apparently expired. go to NCrunch.net instead. The product is still alive and well. I used it for a couple years while it was free, and it was fantastic. If you're in a TDD environment, you won't want to develop without it.Vociferant
Only that NCrunch does not yet support DNX projects, which if using xunit, you're then limited to the command line (dnx-watch with xunit is kool tho), or the VS Test RunnerMneme
C
5

You could also have a look at http://www.continuoustests.com/ aka Mighty Moose.

It's not quite as slick as NCrunch, but it is free.

Candlewood answered 17/1, 2014 at 23:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.