使用 Visual Studio 2010 在本地构建后运行单元测试 [英] Running unit tests after local build with Visual Studio 2010
问题描述
使用 Visual Studio 2010,是否可以在本地构建解决方案后自动在解决方案中运行所有单元测试?
Using Visual Studio 2010, is there a way to run all unit tests in a solution automatically after building the solution locally?
推荐答案
您可以录制一个宏来执行此操作.在宏中,您将运行构建,然后开始单元测试.然后,您只需运行宏即可一步完成所有操作.查看 Tools->Macros
了解更多详情.
You could record a macro to do it. In the macro, you would run the build and then start the unit tests. Then you could just run the macro to do it all in one step. Check Tools->Macros
for more details.
编辑您还可以记录宏的键盘快捷键,我认为您可以使用现有的键序列,例如 CTRL-SHIFT-B 进行构建.因此,如果您想覆盖 CTRL-SHIFT-B 的默认行为,这将是一种方法.
EDIT You can also record keyboard shortcuts for the macros, and I think you can use existing key sequences, such as CTRL-SHIFT-B for build. So if you wanted to override the default behavior of CTRL-SHIFT-B, this would be one way.
这篇关于使用 Visual Studio 2010 在本地构建后运行单元测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!