[英]How do I register a test discoverer in .net core with csproj
After upgrading my nunit test project using dotnet migrate to move to from json to csproj. 使用dotnet migrate升级我的nunit测试项目后,从json迁移到csproj。 I can no longer run my tests. 我不能再进行测试了。 I get a message saying: 我收到一条消息说:
No test discoverer is registered to perform discovery of test cases. 没有注册测试发现者来执行测试用例的发现。 Register a test discoverer and try again. 注册测试发现者,然后重试。
for reference here is my csproj file 这里参考的是我的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>
The following page tells you what to do for xunit and mstest but not for nunit: 以下页面告诉您如何为xunit和mstest做些什么,而不是为nunit做什么:
https://docs.microsoft.com/en-us/dotnet/articles/core/tools/project-json-to-csproj#testrunner https://docs.microsoft.com/en-us/dotnet/articles/core/tools/project-json-to-csproj#testrunner
How do I register a test discoverer? 如何注册测试发现者?
他们正在更新适配器,请参阅此推文 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.