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" ?
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 vstestcommand is superseded bydotnet test, which can now be used to run assemblies. See dotnet test.
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.