gpt4 book ai didi

c# - Visual Studio - 使用特定的 TestCategory 值运行自动化的 TestMethods

转载 作者:行者123 更新时间:2023-11-30 23:05:28 25 4
gpt4 key购买 nike

在 Visual Studio Web 应用程序中,我在部署成功构建运行冒烟测试的环境后添加了一个任务。冒烟测试的 TestCategory 为“SmokeTest”。

我想要完成的是让任务只运行 TestCategory 为“SmokeTest”的 TestMethods。我读到我需要做的是在“覆盖测试运行参数”字段中添加一些内容,但我不确定具体是什么。

附加信息:
-使用 Visual Studio 2017 社区
-使用带 C# 的 Selenium 框架

enter image description here

最佳答案

您需要找到测试过滤条件字段并输入以下内容。

TestCategory=SmokeTest

enter image description here

来源:https://blogs.msdn.microsoft.com/devops/2015/09/04/supplying-run-time-parameters-to-tests/

关于c# - Visual Studio - 使用特定的 TestCategory 值运行自动化的 TestMethods,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48814368/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com