Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrating dotnet-test-xunit breaks test execution. #7098

Closed
NTaylorMullen opened this issue Nov 5, 2016 · 7 comments
Closed

Migrating dotnet-test-xunit breaks test execution. #7098

NTaylorMullen opened this issue Nov 5, 2016 · 7 comments

Comments

@NTaylorMullen
Copy link
Contributor

Steps to reproduce

  • dotnet migrate this super simple project. Key thing about this project is it has a dotnet-test-xunit 2.2.0-* dependency which enabled it to run in project.json land.
  • Add <OutputType>Exe</OutputType> to top level PropertyGroup. This is to workaround a test execution bug.
  • dotnet restore
  • dotnet test

Expected behavior

Microsoft (R) Test Execution Command Line Tool Version 15.0.0.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
Passed   Tests.Tests.Test1

Total tests: 1. Passed: 1. Failed: 0. Skipped: 0.
Test Run Successful.
Test execution time: 2.3253 Seconds

Actual behavior

  • You get an output that looks something like:
Test run for C:\Users\nimullen\Documents\temp\msbuild\bin\Debug\netcoreapp1.0\msbuild.dll(.NETCoreApp,Version=v1.0)
Microsoft (R) Test Execution Command Line Tool Version 15.0.0.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...

It never states results of tests being run. You can then get the actual behavior by removing the dotnet-test-xunit dependency.

Environment data

dotnet --info output:

.NET Command Line Tools (1.0.0-preview3-004056)

Product Information:
 Version:            1.0.0-preview3-004056
 Commit SHA-1 hash:  ccc4968bc3

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.14393
 OS Platform: Windows
 RID:         win10-x64

Extra

@bradwilson is the original owner of dotnet-test-xunit and that contained the xunit runner for the old world. It'd be a good idea to reach out and make sure everyone's on the same page for when it comes to invoking test runners, whether it be ours or third parties. This issue might spawn a different one in SDK to allow runners like Brad's to plug into the CLI test experience. For the interim, migrating all that we do for test projects breaks things 😄

@bradwilson
Copy link
Contributor

dotnet-test-xunit is going away. The Visual Studio runner is being updated with .NET Core support.

@bradwilson
Copy link
Contributor

bradwilson commented Nov 6, 2016

For what it's worth, I'm seeing the exact same behavior with the new Visual Studio runner. I'm engaged with @harshjain2 who did the work.

@NTaylorMullen
Copy link
Contributor Author

Ah, good to know! Thanks Brad!

@bradwilson
Copy link
Contributor

There are 2.2 beta 4 builds of xunit and xunit.runner.visualstudio on NuGet that should work for you now. (The dotnet-test-xunit package is being retired.)

@livarcocc
Copy link
Contributor

Migration will now remove the reference to dotnet-test-xunit.

@harshjain2
Copy link
Contributor

@livarcocc Migration should also remove the reference of dotnet-test-mstest as well.

@TheRealPiotrP
Copy link
Contributor

@harshjain2 can you open an issue to track that one?

@msftgits msftgits transferred this issue from dotnet/cli Jan 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants