gpt4 book ai didi

xunit - 使用 xunit 控制台说明多个特征?

转载 作者:行者123 更新时间:2023-12-04 18:03:05 25 4
gpt4 key购买 nike

我找不到任何关于我认为是一个相当明显的问题的信息。xunit.console.clr4 命令行 arg 帮助状态:

usage: xunit.console.clr4 <xunitProjectFile> [options]
usage: xunit.console.clr4 <assemblyFile> [configFile] [options]

Valid options:
/silent : do not output running test count
/teamcity : forces TeamCity mode (normally auto-detected)
/wait : wait for input after completion
/trait "name=value" : only run tests with matching name/value traits
: if specified more than once, acts as an OR operation
/-trait "name=value" : do not run tests with matching name/value traits
: if specified more than once, acts as an AND operation

Valid options for assemblies only:
/noshadow : do not shadow copy assemblies
/xml <filename> : output results to Xunit-style XML file
/html <filename> : output results to HTML file
/nunit <filename> : output results to NUnit-style XML file

所以很清楚如何格式化 cl 选项来指定单个特征规则:

/trait "MyTrait=LongTest"

但是如果我想在同一次运行中陈述多个特征怎么办?我是否添加了多个/trait 条目,例如,

/trait "MyTraits=LongTest" /trait "MyTraits=MediumTest"

?感谢您对此提供的任何帮助。

最佳答案

如帮助所述:

/trait "name=value"    : only run tests with matching name/value traits
: <b>if specified more than once, acts as an OR operation</b>

您必须添加多个 /trait 条目。

关于xunit - 使用 xunit 控制台说明多个特征?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31797704/

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