1

我正在使用 VSTest 通过 Azure DevOps 运行测试。测试成功运行,但使用选项rerun failed tests: true,在重新启动阶段出现错误。

NUnit 3.12.0 ; NUnit 适配器 3.16.1.0(与 4.0.0.0 一起检查)

vstest.console.exe "C:\agent2.172.2\_work\r1\a\UITest\drop\Tests.Web\bin\Release\netcoreapp3.1\Tests.Web.dll"
/Settings:"C:\agent2.172.2\_work\_temp\3utv233tymm.runsettings"
/Logger:"trx"
/TestAdapterPath:"C:\agent2.172.2\_work\r1\a\UITest\drop\Tests.Web\bin\Release\netcoreapp3.1"
/TestCaseFilter:"FullyQualifiedName=Tests.Web.Tests._5.CourierModuleTest.N1_SendingTest.Id_5_1_01_TransferToCourierModule(Chrome)|FullyQualifiedName=Tests.Web.Tests._3.IssuanceOfDocuments.InformationOnTheApplicationIdentificationOfRecipient.N2_RecipientIdentificationTest.Id_3_2_13_RegisterAddressByFiasTest(Chrome)"
NUnit Adapter 3.16.1.0: Test execution started
An exception occurred while invoking executor 'executor://nunit3testexecutor/': Incorrect format for TestCaseFilter Missing Operator '|' or '&'. Specify the correct format and try again. Note that the incorrect format can lead to no test getting executed.

如何修复此错误并成功重新启动 DevOps 中的测试?

我尝试用谷歌搜索类似的问题,但没有找到任何可行的方法。非常感谢任何帮助

4

1 回答 1

0

根据azure-pipelines-task repo的贡献者的评论,这里有类似的讨论

1.您应该将其中的 VS 和 VSTest 组件更新到最新版本,因为我们不支持 Rerun 场景的数据驱动测试。它将在 VS 15.8 及更高版本中提供。

2.您应该按照此解决方案配置您的 VSTest 任务:

在此处输入图像描述

建议将您的测试总数作为输入 ( Number of tests per batch)。

于 2020-07-30T02:34:16.647 回答