3

如何配置 SpecFlow 使其不显示计时信息作为测试文本的一部分,例如

-> 完成:Steps.ThenIWillBeDeniedAccess() (0.0s)

干杯。贾斯。

4

1 回答 1

5

原来我需要把它放在app.config文件中:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="specFlow" type="TechTalk.SpecFlow.Configuration.ConfigurationSectionHandler, TechTalk.SpecFlow"/>
  </configSections>
  <specFlow>
    <language feature="en-GB" />
    <unitTestProvider name="nUnit" />

    <trace traceSuccessfulSteps="false" traceTimings="false" />
  </specFlow>
</configuration>

这里的关键设置是traceSuccessfulSteps,设置它就可以false了。

于 2010-10-21T08:22:42.530 回答