【发布时间】:2017-04-11 10:00:03
【问题描述】:
我使用以下 csproj 文件创建了一个 ASP.NET Core 1.1 xunit 测试项目:
<Project ToolsVersion="15.0">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" />
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp1.6</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="**\*.cs" />
<EmbeddedResource Include="**\*.resx" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Sdk" Version="1.0.0-alpha-20161104-2">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0- preview-20161123-03" />
<PackageReference Include="Microsoft.NETCore.App" Version="1.1.0" />
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ClassLib\ClassLib.csproj"/>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
我可以通过命令行使用dotnet test 运行该项目,但我看不到任何有关多少测试通过或失败的信息。
我使用的 Dotnet 命令行版本是:
.NET Command Line Tools (1.0.0-preview4-004124)
如何显示测试结果?
【问题讨论】:
标签: asp.net-core xunit xunit.net