单元测试中出现的xUnit GUI(xunit.gui.clr4.exe),但不VS 2012测试资源管理器 [英] Unit tests appear in xUnit GUI (xunit.gui.clr4.exe) but not VS 2012 Test Explorer

查看:228
本文介绍了单元测试中出现的xUnit GUI(xunit.gui.clr4.exe),但不VS 2012测试资源管理器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个F#类库与xUnit.net,用的NuGet安装xUnit.net运动员的包。我有以下代码:

I have an F# Class Library with the "xUnit.net" and "xUnit.net Runners" packages installed using NuGet. I have the following code:

module XUnitTest

open Xunit

[<Fact>]
let Test () =
    do Assert.True (1 = 2)
    ()

当我运行的xUnit GUI(xunit.gui.clr4.exe,它的NuGet增加(projectdirectory)\packages\xunit.runners.1.9.1\tools ),并加载这个项目中,测试()出现的方法,当我运行它,果然未能建立组装。

When I run the xUnit GUI (xunit.gui.clr4.exe, which NuGet adds to (projectdirectory)\packages\xunit.runners.1.9.1\tools), and load the assembly built by this project, the Test () method appears, and fails when I run it, as expected.

不过,我不能让测试出现在VS 2012的测试资源管理器,不管我有多少次重建,重新启动等。如果我点击运行所有,生成输出窗口出现了,却没有什么事情发生。

However, I cannot get the test to appear in VS 2012's Test Explorer, no matter how many times I rebuild, restart, etc. If I click Run All, the build output window pops up but nothing else happens.

有关它赫克我还安装了xUnit.net扩展,但我不相信他们是必要的什么,我试图做的。这并没有帮助。

For the heck of it I also installed the xUnit.net Extensions, though I don't believe they're necessary for what I'm trying to do. That didn't help either.

请让我知道如果我可以提供更多的信息,感谢您的阅读!

Please let me know if I can provide additional information and thank you for reading!

推荐答案

很肯定在这个基础上/往返,你需要安装<罢工>的 xUnit.net亚军为Visual Studio 2012 VSIX扩展 中的 xUnit.net亚军的NuGet包详见对相关的xUnit文档页面

Pretty sure based on the to/fro that you need to install xUnit.net runner for Visual Studio 2012 VSIX extension the xUnit.net runners NuGet package as detailed on the relevant xUnit docs page.

的MSTest相当于内置于一个标准的安装VS

The MSTest equivalent is built in to a standard VS install.

这篇关于单元测试中出现的xUnit GUI(xunit.gui.clr4.exe),但不VS 2012测试资源管理器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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