I have build and published my .NET Core MsTest test library using this command:
dotnet publish .\XunitTestLib\XunitTestLib.csproj -o Tester --self-contained -r win7-x64 /p:UseAppHost=true /p:RuntimeIdentifier=win7-x64
I usually run the project with the dotnet test
command:
dotnet test .\Tester\ --filter TestCategory=order --logger trx --results-directory .\TestResults --settings .\XunitTestLib\runsettings.xml
I am running the published library with this dotnet vstest
command as I believe (from the documentation) that a published test library cannot be run using dotnet test
:
dotnet vstest Tester\XunitTestLib.dll --TestCaseFilter:"TestCategory=order" --logger:trx --ResultsDirectory:./TestResults --settings:./XunitTestLib/runsettings.xml
The /TestResults
folder is created with the usual subfolders, but no content, and the execution never completes, whereas under dotnet test
it takes around 1 minute.
Have I mapped from dotnet test
to dotnet vstest
correctly?
[EDIT]
Turns that the error I'm actually getting is related/similar to this one...
Unable to create new service: ChromeDriverService
Build info: version: '3.141.0', revision: '2ecb7d9a', time: '2018-10-31T20:22:52'
System info: host: 'MW12345', ip: '123.456.789.01', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_201'
Driver info: driver.version: unknown (SessionNotCreated)
However, this does not happen when running as a regular build (ie: without publishing) under dotnet test
.
Why would running dotnet vstest
against the output of dotnet publish
have this negative effect?