How can I continuously run unit tests in Visual St

2019-02-05 17:17发布

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)

4条回答
别忘想泡老子
2楼-- · 2019-02-05 17:53

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.

查看更多
淡お忘
3楼-- · 2019-02-05 17:57

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.

查看更多
冷血范
4楼-- · 2019-02-05 18:13

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

查看更多
该账号已被封号
5楼-- · 2019-02-05 18:17

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

查看更多
登录 后发表回答