使用 Gallio 从 VS2012 运行 vstest [英] Using Gallio to run vstest from VS2012

查看:44
本文介绍了使用 Gallio 从 VS2012 运行 vstest的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很惊讶我无法在网上找到这些信息.我们使用 Sonar 运行 Gallio 来收集测试覆盖率信息.Gallio 运行时会报以下错误.

I am surprised that I have not been able to find this information online. We use Sonar to run Gallio to collect test coverage information. When Gallio runs it reports the following error.

Cannot run tests because the MSTest executable was not found

现在我们使用 Visual Studio 2012.测试运行程序不再是 mstest,而是 vstest.console.exe.Gallio 可以使用 Visual Studio 2012 测试运行程序吗?如果可以,我该如何设置?

Now we use Visual Studio 2012. The test runner is no longer mstest, but is instead vstest.console.exe. Can Gallio use the Visual Studio 2012 test runner, and if so, then how do I set that up?

推荐答案

Gallio 只使用 MSTest.exe 来运行测试,所以你至少需要安装 VS2010 测试代理来执行测试:https://code.google.com/p/mb-unit/issues/detail?id=899

Gallio only uses MSTest.exe to run tests so you need to at least have the VS2010 test agents installed execute tests: https://code.google.com/p/mb-unit/issues/detail?id=899

Gallio 目前无法使用 Visual Studio 测试运行程序,这意味着您不能在 MSTest.exe 所做的单元测试中使用 Fakes 之类的东西不知道如何仪表.尽管许多 VS2012/2013 测试可以使用 MSTest.exe 成功运行,但除非使用 vstest.console.exe 运行,否则新功能将失败,这需要在 Gallio 中作为扩展实现才能正常工作:https://code.google.com/p/mb-unit/issues/detail?id=923

Gallio does not have the ability to use the Visual Studio test runner at this time which means you cannot use things like Fakes in your unit tests which MSTest.exe does not know how to instrument. Although many VS2012/2013 tests will run successfully with MSTest.exe, new features will fail unless run with vstest.console.exe which needs to be implemented as an extension in Gallio to work correctly: https://code.google.com/p/mb-unit/issues/detail?id=923

如果您只需要 Gallio 运行用 VS2012 编写的单元测试,请安装测试代理以使 MSTest.exe 可供 Gallio 运行测试.如果您希望 Gallio 使用 vstest.console.exe 并使用 MSTest.exe 无法运行的新测试功能,则需要等待此扩展添加到 Gallio(或自己贡献).

If you just need Gallio to run your unit tests written in VS2012, install the test agents to make MSTest.exe available to Gallio to run the tests. If you want Gallio to use vstest.console.exe and make use of new test features that MSTest.exe are not capable of running, you will need to wait for this extension to be added to Gallio (or contribute it yourself).

这篇关于使用 Gallio 从 VS2012 运行 vstest的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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