vstest: dotnet test doesn't work on .NET Core 3.0 Preview 6

From @omajid on Friday, June 28, 2019 9:56:30 PM

Steps to reproduce

dotnet --info
dotnet new xunit
dotnet test

Expected behavior

The generated UnitTest1 class with the single Test1 is executed and the test is marked as passed

Actual behavior

Microsoft (R) Test Execution Command Line Tool Version 16.0.1-dev+ea406627f919daa1d8da7daabe2d1f6619d2ad72
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
No test is available in /home/omajid/temp/test/bin/Debug/netcoreapp3.0/test.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.

Additionally, path to test adapters can be specified using /TestAdapterPath command. Example  /TestAdapterPath:<pathToCustomAdapters>.

Environment data

dotnet --info output:

.NET Core SDK (reflecting any global.json):
 Version:   3.0.100-preview6-012264
 Commit:    be3f0c1a03
                                                           
Runtime Environment:                                                                                                  
 OS Name:     fedora                                       
 OS Version:  30                                                                                                      
 OS Platform: Linux                                                                                                   
d RID:         fedora.30-x64                               
 Base Path:   /usr/lib64/dotnet/sdk/3.0.100-preview6-012264/                          
                             
Host (useful for support):                                                                                            
  Version: 3.0.0-preview6-27804-01
  Commit:  17dd7897d6                                      
                                                                                                                      
.NET Core SDKs installed:
  3.0.100-preview6-012264 [/usr/lib64/dotnet/sdk]                                                                     

.NET Core runtimes installed: 
  Microsoft.NETCore.App 3.0.0-preview6-27804-01 [/usr/lib64/dotnet/shared/Microsoft.NETCore.App]
                                                           
To install additional .NET Core runtimes or SDKs:                                                                     
  https://aka.ms/dotnet-download

This dotnet SDK was compiled from the v3.0.0-preview6-27804-01 tag of source-build.

Copied from original issue: dotnet/cli#11663

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 22 (19 by maintainers)

Most upvoted comments

I’ve looked into this further and traced down the issue to xunit json parsing: https://github.com/xunit/xunit/issues/1980.

@dagood Here’s a Dockerfile that should reproduce the issue:

FROM fedora:30

RUN dnf install dnf-plugins-core -y && \
    dnf copr enable @dotnet-sig/dotnet-preview -y && \
    dnf install dotnet-sdk-3.0 -y

CMD dotnet --info && \
    dotnet new xunit -o Sample && \
    cd Sample && \
    dotnet test