[英]Invalid on demand test run run id 0 error when running pipeline test
I'm running automation tests through my Azure DevOps pipeline.我正在通过我的 Azure DevOps 管道运行自动化测试。 The tests run successfully in one environment but when it goes to run in the next environment I get the following errors:
测试在一个环境中成功运行,但是当它在下一个环境中运行时,出现以下错误:
[error]Input validation failed with exception: Invalid on demand test run id 0. Has to be greater than 0.
[错误]输入验证失败,出现异常:按需测试运行 ID 0 无效。必须大于 0。
[error]Error: The process 'd:\a_tasks\VSTest_ef087383-ee5e-42c7-9a53-ab56c98420f9\2.153.9\Modules\DTAExecutionHost.exe' failed with exit code 1
[错误]错误:进程 'd:\a_tasks\VSTest_ef087383-ee5e-42c7-9a53-ab56c98420f9\2.153.9\Modules\DTAExecutionHost.exe' 失败,退出代码为 1
Tried to play around with the config but nothing seems to resolve the issue.尝试使用配置,但似乎无法解决问题。
I know this is an older post but I ran into the same problem and I think found a resolution.我知道这是一篇较旧的帖子,但我遇到了同样的问题,我认为找到了解决方案。
Some of the things that helped me below:以下一些对我有帮助的事情:
you have to have a release pipeline that consumes a build pipeline as an artifact if you want to run automated tests from the Test Plans section of Azure.如果你想从 Azure 的测试计划部分运行自动化测试,你必须有一个将构建管道作为工件使用的发布管道。
there are 3 test options you can use in the release pipeline: "Test plan", "Test run", or "Test assemblies".您可以在发布管道中使用 3 个测试选项:“测试计划”、“测试运行”或“测试程序集”。 I think the only one that works from the Test Plans section of Azure is the "Test run" option.
我认为 Azure 的测试计划部分唯一有效的是“测试运行”选项。 If you use another option you can get similar errors.
如果您使用其他选项,您可能会遇到类似的错误。 Similarly, when you are triggering the pipeline from the Pipelines section you must use the "Test assemblies" or "Test plan" options.
同样,当您从管道部分触发管道时,您必须使用“测试程序集”或“测试计划”选项。
Double check the Test Case -> Automated Association tab to ensure that it looks correct.仔细检查 Test Case -> Automated Association 选项卡以确保它看起来正确。 I had a case where we changed the name of our DLL and that broke all of our Automated Associations.
我有一个案例,我们更改了 DLL 的名称,这破坏了我们所有的自动关联。 Because of that we kept getting errors such as above.
因此,我们不断收到上述错误。
That was a tougher one to catch because it had nothing to do with the pipeline itself, but the Automated Associations all had to be re-done via the "Associate to Test Case" functionality in VS Test Explorer and the associations on the Azure Test Cases themselves.这是一个更难捕捉的问题,因为它与管道本身无关,但所有自动关联都必须通过 VS 测试资源管理器中的“关联到测试用例”功能和 Azure 测试用例上的关联重新完成他们自己。
hope that helps someone in the future!希望将来能帮助别人!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.