简体   繁体   English

如果dnx版本大于451,为什么xUnit测试在Test Explorer中不可见?

[英]Why does xUnit tests are not visible in Test Explorer if dnx version is > to 451?

We made a whole new project, and we want to use xUnit as unit test. 我们做了一个全新的项目,我们想使用xUnit作为单元测试。 However, we want to target .net 4.6.0 and .net core 1.0. 但是,我们希望以.net 4.6.0和.net core 1.0为目标。

We have all our project in net460 in all of our project.json. 我们所有的project.json文件都包含在net460中的所有项目。 As far as I see, to be compatible with xUnit, we need to have our test project in dnx451. 据我所知,要与xUnit兼容,我们需要在dnx451中有我们的测试项目。 This is where we have a problem, because we target 460 at least ... 这是我们遇到的问题,因为我们至少将460目标定位为...

When we change to dnx460 in xUnit project.json, tests are not visible in test explorer ... ? 当我们在xUnit project.json中更改为dnx460时,测试在资源管理器中不可见...? Is there a reason ? 有原因吗? Are we mistaking somewhere ? 我们在某个地方犯错了吗?

We use VS2015. 我们使用VS2015。

Here's our project.json 这是我们的project.json

{
  "version": "1.0.0-*",
  "description": "SESAMEngineFacturation.Tests Class Library",
  "authors": [ "christophe.mom" ],
  "tags": [ "" ],
  "projectUrl": "",
  "licenseUrl": "",
  "commands": {
    "test": "xunit.runner.dnx"
  },
  "dependencies": {
    "SESAMEngineFacturation": "",
    "xunit": "2.1.0",
    "xunit.runner.dnx": "2.1.0-*",
    "FluentAssertions": "4.2.2"
  },
  "frameworks": {
    "dnx451": { }
  }
}

根据这个GitHub问题: https : //github.com/xunit/xunit/issues/600我想我们必须等待ASP.NET Core RC2发布才能在VSTests和Resharper上获得对xunit.runner的dnx460支持单元测试资源管理器也是如此。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 没有xUnit DNX的并行测试 - No parallel tests with xUnit DNX Xunit 测试测试资源管理器未运行测试 - Xunit testing test explorer not running tests xUnit v1测试出现在xUnit GUI(xunit.gui.clr4.exe)中但不出现在VS 2012 Test Explorer中 - xUnit v1 tests appear in xUnit GUI (xunit.gui.clr4.exe) but not VS 2012 Test Explorer 如何针对dnx451在dnx50项目上运行测试? - How do I run tests on my dnx50 project against dnx451? 在 Visual Studio 2022 的测试资源管理器中未检测到“未找到要运行的测试”Xunit 测试 - "No tests found to run" Xunit test not detected in Test explorer, Visual Studio 2022 在vs Test Explorer中运行XUnit测试时,CSLA的WCF使用率导致模拟异常 - CSLAs WCF usage when running XUnit tests in vs test explorer causes an Impersonation Exception VS Test Explorer没有找到我的单元测试(XUnit.Runner)ASP.NET 5 - VS Test Explorer is not finding my Unit Tests (XUnit.Runner) ASP.NET 5 为什么没有断言的 xUnit Fact 类型测试总是通过? - Why does an xUnit Fact type test without assertions always passes? Xunit仅完成1个测试,但项目中有6个测试 - Xunit only completing 1 test but there are 6 tests in the project 发现了XUnit测试,但未通过“运行所有测试”运行 - XUnit test is discovered but not run by 'run all tests'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM