Azure DevOps "Visual Studio Test"- 使用 "Rerun Failed Tests"时无法启用 "Override Parameters"

标签 azure testing azure-devops release azure-pipelines-release-pipeline

我有一个发布定义,我想在同一步骤中使用“覆盖参数”和“重新运行失败的测试”,这看起来像这样:

enter image description here

enter image description here

当我只指定了覆盖参数时,一切正常,没有问题。当我启用“重新运行失败的测试”选项时,我在版本中收到以下错误:

SettingsUpdation.Run : Exception occurred during the updation of run settings: System.FormatException: Error encountered while overriding test run parameters. Please check the test run parameteres provided. Error occurred while publishing test results : Skipping marking test run as complete as test run id 0 is invalid. Error: C:\TFSAgent4_work_tasks\VSTest_ef087383-ee5e-42c7-9a53-ab56c98420f9\2.143.8\Modules\DTAExecutionHost.exe failed with return code: 1 Vstest failed with error. Check logs for failures. There might be failed tests.

详细来说是这样的:

2019-04-04T13:52:40.2481161Z ##[warning]Unable to parse the override run parameters string: -SpecificDatabaseConnectionName=XXX_TestCI -SpecificDatabaseConnectionIPAddress=10.0.0.119 2019-04-04T13:52:40.2941407Z ##[error]SettingsUpdation.Run : Exception occurred during the updation of run settings: System.FormatException: Error encountered while overriding test run parameters. Please check the test run parameteres provided.

我不确定是什么原因造成的,这对我来说似乎是一个错误,我还需要设置什么才能使这两个选项正确协同工作吗?

更新 1

我的理解是其他用户也遇到过这个问题(根据已删除的答案),我从未测试过以前版本的 TFS,所以我不知道它是否特定于 Azure DevOps 或涵盖其他版本的 TFS。我也不知道这是否是 Azure 托管版本的 DevOps 中的问题,我很好奇这是否也受到影响?

它可能是测试步骤中的一个参数,可能是 version of Visual Studio安装在构建代理服务器上,或 something else涵盖我运行测试的方式,我过去见过很多可能导致构建代理失控的事情,我将继续尝试不同的变体,看看我是否可以确定其中是否有任何一个是根本原因。

最佳答案

我想我已经弄清楚了,如果您看到工具提示,我似乎对如何提供参数(是否带有“=”)感到困惑:

enter image description here

没有“=”,现在谷歌一下,你会看到 people using them 。有趣的是,我之前使用过这两种格式,没有出现任何问题,但是在尝试使用此格式时,我尝试切换到其他格式:

enter image description here

似乎解决了问题,但不确定为什么......

关于Azure DevOps "Visual Studio Test"- 使用 "Rerun Failed Tests"时无法启用 "Override Parameters",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55519878/

相关文章:

azure - FreeBSD 上的 WALinuxAgent 服务未安装

python - 如何自动销毁django测试数据库

reactjs - 如何模拟实际上是 Redux 的连接 Action 创建者的 Prop ?

go - 如何在 Go 中对测试包进行代码覆盖

azure-devops - Azure管道: do not build again in order to run tests

azure - 在 Docker 中运行的自定义 Azure DevOps 构建代理上安装卷的测试容器

azure - 从 Azure 服务总线队列读取消息,但不是实时的

r - 使用 R 访问 Azure Databricks 中的大数据的最佳实践

twitter - 您将如何使用 Azure 表存储来处理类似 Twitter 的应用程序?

azure - 如何在azure devops管道中执行azure cli命令