我将尝试在部署过程中编写程序来检查我的单元测试是否通过。该应用程序使用MBunit和Gallio作为其单元测试框架。
以下是我的代码:
当我运行应用程序时,
以下是我的代码:
var setup = new Gallio.Runtime.RuntimeSetup();
setup.AddPluginDirectory(@"C:\Program Files\Gallio\bin");
using (TextWriter tw = new StreamWriter(logFilename))
{
var logger = new Gallio.Runtime.Logging.TextLogger(tw);
RuntimeBootstrap.Initialize(setup, logger);
TestLauncher launcher = new TestLauncher();
launcher.AddFilePattern(dllToRunFilename);
TestLauncherResult result = launcher.Run();
}
这里是我正在加载的DLL中包含的测试(我已经使用Icarus测试运行程序验证过了):
public class Tests
{
[Test]
public void Pass()
{
Assert.IsTrue(true);
}
[Test]
public void Fail()
{
Assert.Fail();
}
}
当我运行应用程序时,
results
中出现了以下数值:
我该如何解决此问题并找到测试结果?已禁用插件 'Gallio.VisualStudio.Shell90':插件启用条件未满足。请注意,这对于必须在第三方应用程序中托管才能工作的插件来说,这是预期的行为。启用条件:'${process:DEVENV.EXE_V9.0} or ${process:VSTESTHOST.EXE_V9.0} or ${process:MSTEST.EXE_V9.0} or ${framework:NET35}'。已禁用插件 'Gallio.VisualStudio.Tip90':该插件依赖于另一个已禁用的插件:'Gallio.VisualStudio.Shell90'。