Oğu*_*kan 8 resharper unit-testing xunit.net .net-core
project.json文件xunit引用是;
"xunit": "2.2.0-beta2-build3300",
"xunit.abstractions": "2.0.1-rc2",
"xunit.assert": "2.2.0-beta2-build3300",
"xunit.extensibility.core": "2.2.0-beta2-build3300",
"xunit.extensibility.execution": "2.2.0-beta2-build3300",
"xunit.runner.console": "2.2.0-beta2-build3300",
"xunit.runner.visualstudio": "2.2.0-beta2-build1149",
"xunit.runners": "2.0.0"当我尝试使用ReSharper xUnit测试跑步者时,我遇到了;
"单元测试运行器无法运行测试,无法运行xUnit测试 - 找不到文件:"D:\ srcs\GitProjects..etc\bin\My.Tests.dll"参数名称:assemblyFileName
Resharper中对.NET Core测试的支持计划在2016.3
解决方法是使用Visual Studio Test Explorer.(测试 - > Windows - >测试资源管理器)
该project.json文件必须包含xunit和dotnet-test-xunit:
{
  ...
  "testRunner": "xunit",
  "dependencies": {
    ...
    "xunit": "2.2.0-beta2-build3300",
    "dotnet-test-xunit": "2.2.0-preview2-build1029",
  },
  ...
}
重建您的项目,您应该能够成功运行您的测试.如果您有Visual Studio 2015,则可以在代码中开始测试.
更新:(2017-02-08)它也适用nunit;
{
  "testRunner": "nunit",
  "dependencies": {
    ...
  "NUnit": "3.5.0",  
  "dotnet-test-nunit": "3.4.0-beta-3"
  },
...
}
| 归档时间: | 
 | 
| 查看次数: | 3115 次 | 
| 最近记录: |