如何阻止SpecFlow显示计时信息(How to stop SpecFlow from displaying timing information)

编程入门 行业动态 更新时间:2024-10-23 08:27:14
如何阻止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.

更多推荐

本文发布于:2023-07-24 20:06:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1250550.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:信息   stop   SpecFlow   information   timing

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!