automated-tests - Chutzpah 4.4.11 在使用 vstest 运行时失败,退出代码为 2
问题描述
vstest.console.exe 16.10 适用于 Chutzpah 4.2.3。但是升级到 Chutzpah 4.4.11,退出代码为 2 失败。chutzpah.console.exe 在 4.4.11 中也可以单独工作,所以我不确定我是否在 vstest 命令行中遗漏了一些东西。(从 Azure DevOps 管道运行时,我使用 vstest.console.exe 得到相同的结果。)
有什么建议么?
> "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\vstest.console.exe"
"[path-to-test-file]\index-tests.js"
/TestAdapterPath:"C:\Users\TFSBuild\.nuget\packages\chutzpah\4.4.11\tools"
Microsoft (R) Test Execution Command Line Tool Version 16.10.0
Copyright (c) Microsoft Corporation. All rights reserved.
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
Error: Unknown error occurred when executing test file. Received exit code of 2
While Running:[path-to-test-file]\index-tests.js
No test is available in [path-to-test-file]\index-tests.js.
Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
Test Run Failed.
解决方案
找到了解决方案。我正在使用引擎:Chrome,而较新版本的 Chutzpah 无法找到 chrome.exe。在 Chutzpah.json 中定义 exe 的路径解决了这个问题。
"Engine": "Chrome",
"EngineOptions": {
"ChromeBrowserPath": "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe"
}
推荐阅读
- c# - 如何设置背景无颜色 ASP.NET C#
- android - 使用 SpongyCastle 在某些操作系统版本上生成非常慢的密钥
- typescript - 带有 rxjs 的打字稿
- python - 将 python 导入语句添加到 Pyspark 代码
- tsql - 具有空值的相关子查询
- validation - 验证后如何在 Laravel 控制器中捕获并返回错误?
- nginx - Ubuntu 18.04 Nginx - 总是只显示欢迎页面
- python - 自定义小部件作为 ListView 中的元素
- node.js - {"msg":"invalid_request"} 当我在 Nodejs 中使用 nodemailer 从 Gmail 发送邮件时出现错误
- java - MySQL 查询在命令行和 Java 中执行时给出不同的输出