【问题标题】:NUnit tests are not restarted through VSTest in DevOpsNUnit 测试不会通过 DevOps 中的 VSTest 重新启动
【发布时间】:2020-11-18 15:58:22
【问题描述】:

我正在使用 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 中的测试?

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

【问题讨论】:

    标签: selenium azure-devops nunit vstest vstest.console.exe


    【解决方案1】:

    这里是similar discussion,来自azure-pipelines-task repo的贡献者的cmets:

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

    2.你应该按照this solution配置你的VSTest任务:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-08-22
      • 2021-09-10
      • 2020-08-13
      • 2021-05-07
      • 1970-01-01
      • 2013-10-26
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多