我正在尝试在 Azure Pipelines 中的 Visual Studio Test 中运行测试。它一直有效,直到我最近从云提供商那里获取了一个 SDK,它让我可以为我的环境设置运行设置。我还将 Dotnet Appium 版本升级到最新版本 5.0。过去,我可以在 VsTest 中使用 TestCategory,它会通过 VsTest 代理中的测试来过滤我的测试。现在它不遵守这一点。它找到了模式,但告诉我它不会这样做。我还尝试在运行设置中添加带有类别的源过滤器,但这也没有改变任何内容。我能找到的唯一错误如下:
IsValidServiceResponse: Received None command..Service Workflow is not active
Creating run for selected test assemblies with following parameters
SourceFilter: ThisWontBeUsed TestCaseFilter: TestCategory=UserSubscription
也面临这个问题
解决方案对我有用:
Visual Studio Test
步骤设置Test filter criteria
填充
TestCategory=$(TestCategory)
TestCategory
部分填写Variables
变量的值