【问题标题】:Azure Devops cscript error - Unexpected end of JSON inputAzure Devops cscript 错误 - JSON 输入意外结束
【发布时间】:2018-11-08 09:56:38
【问题描述】:

我目前正在为客户设置自动化 UI 测试管道。管道本身正在工作(Selenium 测试正在运行并相应地结束),但在 vstest 任务开始时,发布中显示以下错误:

日志本身只是提供更多信息:

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 

发布本身一直显示为“部分成功”,这严重影响了自动通知,因为测试本身成功且没有问题。到目前为止,我还没有在这种情况下找到解决方案。

有人知道如何解决这个问题吗?如果需要,我很乐意提供更多信息。

【问题讨论】:

  • 您可以使用system.debug=true 运行相同的版本并共享日志吗?
  • 我们刚刚解决了这个问题,如给定答案中所述。不过,感谢您的建议!

标签: json azure-devops azure-pipelines-release-pipeline vstest.console.exe


【解决方案1】:

我们只是设法通过以旧方式重新添加构建代理来消除错误(前往 _settings/agentqueues “代理池”并使用“下载代理”)。

以前,我们使用部署组配置代理:虽然我仍然不知道为什么,但这显然与问题有关。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-07-26
    • 1970-01-01
    • 1970-01-01
    • 2016-11-13
    • 1970-01-01
    • 2020-07-10
    相关资源
    最近更新 更多