关于我认为是一个相当明显的问题,我什么都找不到。 xunit.console.clr4命令行arg帮助状态:
Optional
因此很清楚如何格式化cl选项以指定单个特征规则:
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
但如果我想在同一次运行中声明多个特征怎么办?我是否添加了多个/特征条目,例如,
/trait "MyTrait=LongTest"
?感谢您的帮助。
答案 0 :(得分:0)
如帮助所述:
/trait "name=value" : only run tests with matching name/value traits
: if specified more than once, acts as an OR operation
您必须添加多个/trait
条目。