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

Misleading error message when test project is missing test runner #341

Closed
TheRealPiotrP opened this issue Jan 18, 2017 · 1 comment
Closed

Comments

@TheRealPiotrP
Copy link
Contributor

Moved from https://github.com/dotnet/cli/issues/5135 on behalf of @bleroy


Steps to reproduce

Create a new console app, add the xunit package, write a few tests, try to dotnet restore and dotnet test.

Expected behavior

An error message saying to add a test runner, ideally suggesting the right one based on what testing framework is referenced if we have a way to recognize that at this point.

Actual behavior

An error message suggesting to add "microsoft.testplatform.testhost". The right packages to add to make it work really are Microsoft.NET.Test.Sdk and xunit.runner.visualstudio.

Environment data

Reproduces on Preview 3 and Preview 4.

@Faizan2304
Copy link
Contributor

For one more scenario this message should be improved:

Scenario
- Create a unit test project targeting net46
- Try to run it with "dotnet vstest path-of-unit-test-net46-dll"

It should give message to check framework as well because when we run test from "dotnet vstest"
the default framework is netcoreapp1.0.

Faizan2304 pushed a commit to Faizan2304/vstest that referenced this issue Apr 5, 2017
Faizan2304 added a commit that referenced this issue Apr 7, 2017
* Fix for issue:
1) #341
2) #532

* Update message text and fix tests

* Fix test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants