English 中文(简体)
如何停止SpecFlow显示计时信息
原标题:How to stop SpecFlow from displaying timing information
  • 时间:2010-10-21 08:14:57
  •  标签:
  • specflow

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

->;完成:步骤。ThenWillBeDeniedAccess()(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就成功了。

问题回答

暂无回答




相关问题
How to run SpecFlow tests in Visual Studio 2010?

Trying to get SpecFlow running with a fresh VS2010 Professional install. Created a new console application and added references to NUnit and SpecFlow. Created a SpecFlow feature. The .feature with the ...

App.config for SpecFlow not recognized by NUnit GUI runner

How do I get my App.config file to be recognized/used by the NUnit GUI runner? I have tried placing it in the top folder of my project and in the same folder as my feature files. Here are the contents ...

Feature-scoped step definitions with SpecFlow?

I m using SpecFlow to do some BDD-style testing. Some of my features are UI tests, so they use WatiN. Some aren t UI tests, so they don t. At the moment, I have a single StepDefinitions.cs file, ...

SpecFlow vs Cuke4Nuke vs Cucumber+IR

Having a look at BDD frameworks and I can t help but wonder which one would suit us better. I like Cucumber because, they have been there doing BDD for a good while(since early 2008) and I like Ruby, ...

热门标签