如何在 Visual Studio 2012 Professional 中连续运行单元测试? [英] How can I continuously run unit tests in Visual Studio 2012 Professional?

查看:23
本文介绍了如何在 Visual Studio 2012 Professional 中连续运行单元测试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Visual Studio 2012 添加了 关于这个

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:

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)

解决方案

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

这篇关于如何在 Visual Studio 2012 Professional 中连续运行单元测试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆