I'm currently setting up an automated UI-test pipeline for a client. The pipeline itself is working (Selenium tests are running and ending accordingly), but at the start of the vstest task, the following error shows in the release:
The log itself is only slightly more informative:
2018-11-08T09:01:27.5866296Z VisualStudio version selected for test execution : latest
2018-11-08T09:01:27.7436467Z ========================================================
2018-11-08T09:01:27.7481019Z ======================================================
2018-11-08T09:01:27.7896471Z [command]"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" @C:\vstsagent\A3\_work\_temp\e063c6c1-e334-11e8-96ca-cb244534022f.txt
2018-11-08T09:01:27.9515408Z ##[error]Unhandled: Unexpected end of JSON input
2018-11-08T09:01:27.9524437Z ##[error]Unhandled: Command failed: cscript.exe //Nologo C:\vstsagent\A3\_work\_tasks\VSTest_ef087383-ee5e-42c7-9a53-ab56c98420f9\2.142.12\node_modules\regedit\vbs\regListStream.wsf A
2018-11-08T09:01:28.0079953Z ##[error]Unhandled: Unexpected end of JSON input
2018-11-08T09:01:28.0095401Z ##[error]Unhandled: Command failed: cscript.exe //Nologo C:\vstsagent\A3\_work\_tasks\VSTest_ef087383-ee5e-42c7-9a53-ab56c98420f9\2.142.12\node_modules\regedit\vbs\regListStream.wsf A
2018-11-08T09:01:28.1547295Z Microsoft (R) Test Execution Command Line Tool Version 15.8.0
2018-11-08T09:01:28.1550589Z Copyright (c) Microsoft Corporation. All rights reserved.
2018-11-08T09:01:28.1550786Z
2018-11-08T09:01:28.1581289Z vstest.console.exe
The release itself keeps showing as "partially succeeded", which badly influences the automatic notifications, as the tests themselves are succeeding without problems. So far I haven't been able to find a solution in this context.
Does anyone have an idea of how to fix this? I'll be happy to provide more info if needed.
We just managed to get rid of the errors by re-adding the build agent in the old way (heading to _settings/agentqueues "Agent Pools" and using "Download Agent").
Previously, we configured the agent using Deployment Groups: though I still don't know why, this apparently had something to do with the issue.