使用dotnet migrate升级我的nunit测试项目后,从json迁移到csproj.我不能再进行测试了.我收到一条消息说:
No test discoverer is registered to perform discovery of test cases.
Register a test discoverer and try again.
这里参考的是我的csproj文件
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp1.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../Jsonics/Jsonics.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
<PackageReference Include="NUnit" Version="3.6.0" />
<PackageReference Include="dotnet-test-nunit" Version="3.4.0-beta-3" />
</ItemGroup>
</Project>
以下页面告诉您如何为xunit和mstest做些什么,而不是为nunit做什么:
https://docs.microsoft.com/en-us/dotnet/articles/core/tools/project-json-to-csproj#testrunner
如何注册测试发现者?
最佳答案 他们正在更新适配器,请参阅
this tweet.