【问题标题】:xUnit with TFS2015 and VisualStudio2015 doesn't find any test带有 TFS2015 和 VisualStudio2015 的 xUnit 没有找到任何测试
【发布时间】:2015-07-29 17:31:48
【问题描述】:

我有一个带有以下 project.json 的 xUnit 测试项目:

"dependencies": {
  "xunit": "2.1.0-beta2-*",
  "xunit.runner.dnx": "2.1.0-beta2-*"
},

"commands": {
  "test": "xunit.runner.dnx"
},

"frameworks": {
  "dnx451": { },
  "dnxcore50": {
    "dependencies": {
      "System.Collections": "4.0.10-beta-22816",
      "System.Linq": "4.0.0-beta-22816",
      "System.Threading": "4.0.10-beta-22816",
      "Microsoft.CSharp": "4.0.0-beta-22816"
    }
  }
}

我的 Buildserver 能够正确构建所有内容,但通过尝试测试它给了我以下消息:

2015-05-17T18:41:26.0903225Z Warning: No test is available in C:\TfsData\Build\_work\c55817e8\...\artifacts\bin\

我的 Buildserver 使用 TFS2015 运行,并且我安装了 VisualStudio 2015RC。我发现了类似的问题,但仅关于 TFS2013,这对我没有帮助,因为 TFS2015 中没有 TestAgent。现在 xUnit-"Util" 通过 json 文件包含在 NuGet 中。

使用 VisualStudio 进行测试可以正常工作,即使在 VS 的服务器安装中也是如此。

谁能给我一个提示,请问如何解决这个问题?

【问题讨论】:

    标签: visual-studio tfs visual-studio-2015 xunit tfs-2015


    【解决方案1】:

    Visual Studio 中的 DNX 支持很可能尚未支持 TFS 构建。它不使用其他 xUnit.net 测试类型的标准测试发现,而是 ASP.NET 团队添加到 Visual Studio 以支持任何基于 project.json 的项目中的单元测试。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-07-23
      • 1970-01-01
      • 2018-01-12
      • 2014-12-25
      • 1970-01-01
      相关资源
      最近更新 更多