如何阻止SpecFlow显示计时信息(How to stop SpecFlow from displaying timing information)
如何配置SpecFlow,使其不会将时序信息显示为测试文本的一部分,例如
- > done:Steps.ThenIWillBeDeniedAccess()(0.0s)
干杯。 雅。
How can I configure SpecFlow so that it does not display timing information as part of the test text e.g.
-> done: Steps.ThenIWillBeDeniedAccess() (0.0s)
Cheers. Jas.
最满意答案
原来我需要把它放在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就可以了。
Turns out I need to put this in the app.config file:
<?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>The key setting here is traceSuccessfulSteps, setting that to false did the trick.
更多推荐
发布评论