我很惊讶我无法在网上找到这些信息。我们使用 Sonar 运行 Gallio 来收集测试覆盖率信息。Gallio 运行时会报告以下错误。
Cannot run tests because the MSTest executable was not found
现在我们使用 Visual Studio 2012。测试运行器不再是 mstest,而是 vstest.console.exe。Gallio 可以使用 Visual Studio 2012 测试运行程序吗?如果可以,我该如何设置它?
我很惊讶我无法在网上找到这些信息。我们使用 Sonar 运行 Gallio 来收集测试覆盖率信息。Gallio 运行时会报告以下错误。
Cannot run tests because the MSTest executable was not found
现在我们使用 Visual Studio 2012。测试运行器不再是 mstest,而是 vstest.console.exe。Gallio 可以使用 Visual Studio 2012 测试运行程序吗?如果可以,我该如何设置它?
Gallio 仅使用MSTest.exe运行测试,因此您至少需要安装 VS2010 测试代理来执行测试: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 运行用 VS2012 编写的单元测试,请安装测试代理以使Gallio 可以使用MSTest.exe来运行测试。如果您希望 Gallio 使用vstest.console.exe并使用MSTest.exe无法运行的新测试功能,您将需要等待此扩展被添加到 Gallio(或自己贡献)。