Closed cschyma closed 5 years ago
@cschyma It is not so good idea to specify arguments --logger teamcity --test-adapter-path .
there. The path .
means just a current working directory. But your current working directory does not contain any adapters` assemblies.
Just use the command dotnet test
to run tests.
To check TeamCity integration you could specify some TeamCity version via the environment variable SET TEAMCITY_VERSION=2018.2
(to simulate running under TeamCity, but it is not needed when you are running tests in TeamCity because it does it by itself) and run tests. The TeamCity adapter is in active mode when it detects the running under TeamCity, otherwise he tries to minimize his influence on stdOut.
Thus you script to check TeamCity integration from the command line could be like:
dotnet new xunit
dotnet add package TeamCity.VSTest.TestAdapter
SET TEAMCITY_VERSION=2018.2
dotnet test
Thanks! Now it's working!
The documentation at 'VSTest Console' says:
To run tests from the command line, use additional command line arguments: /TestAdapterPath:., /Logger:teamcity
That's why I tried it that way. An automatic resolution via the environment is much better of course.
Could be in connection to https://github.com/JetBrains/TeamCity.VSTest.TestAdapter/issues/31, but is not working even with "TeamCity.VSTest.TestAdapter" Version="1.0.15".
Results in