Docs: "dotnet test" vs "dotnet vstest"

Created on 29 Sep 2019  路  5Comments  路  Source: dotnet/docs

Checking to confirm what is the difference between "dotnet test" vs "dotnet vstest"?

Per best practice which should we be using?

Azure DevOps pipeline task "dotnet" task does not include "vstest" option. Should we be using "dotnet vstest" in pipelines instead of "dotnet test" ?

Area - .NET Core Guide Technology - CLI doc-enhancement product-question waiting-on-feedback

Most helpful comment

Thanks @fds-alm. @KathleenDollard @livarcocc who can provide more info about these two? I think it would be good to add a paragraph about this difference in docs too.
I think supporting just dotnet test in the pipelines should be good. My understanding is that dotnet test supports all test projects and vstest runs the VSTest.Console command-line application.

All 5 comments

Thanks @fds-alm. @KathleenDollard @livarcocc who can provide more info about these two? I think it would be good to add a paragraph about this difference in docs too.
I think supporting just dotnet test in the pipelines should be good. My understanding is that dotnet test supports all test projects and vstest runs the VSTest.Console command-line application.

bump against stale bot

@mairaw cc @KathleenDollard @livarcocc

I think it would be good to add a paragraph about this difference in docs too.

In the meantime, can someone please explain here the use cases for using vstest.console (dotnet vstest) over dotnet test?

Thanks!

According to https://github.com/microsoft/vstest/issues/637, they're the same thing under the hood. I'd imagine it's there to make it easier to migrate from using vstest.console.exe directly.

As of 3.1.1xx, dotnet test can handle the args for both: https://github.com/Microsoft/vstest/issues/1453 https://github.com/microsoft/vstest-docs/pull/196

The dotnet test article now includes a banner that advises

The dotnet vstest command is superseded by dotnet test, which can now be used to run assemblies. See dotnet test.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ygoe picture ygoe  路  3Comments

Manoj-Prabhakaran picture Manoj-Prabhakaran  路  3Comments

skylerberg picture skylerberg  路  3Comments

Eilon picture Eilon  路  3Comments

LJ9999 picture LJ9999  路  3Comments