AKN*_*AKN 2 .net selenium automation specflow specrun
我有一些在我的功能文件中编写的方案,其中包含断言.如果第一个场景未通过断言,则Specflow将跳过其后的所有场景.我希望我的所有场景都能继续运行,即使它们在NUnit中失败也是如此.我使用SpecRun作为测试提供者,我在SpecFlow网站上找不到任何可以帮助我的东西.可能是我在App.config文件中遗漏了什么?
以下是我的App.config文件:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="specFlow" type="TechTalk.SpecFlow.Configuration.ConfigurationSectionHandler, TechTalk.SpecFlow" />
</configSections>
<specFlow>
<!-- For additional details on SpecFlow configuration options see http://go.specflow.org/doc-config -->
<unitTestProvider name="SpecRun" />
<!-- setting flag to continue on first assert error -->
<runtime stopAtFirstError="false" />
<plugins>
<add name="SpecRun" />
</plugins>
</specFlow>
</configuration>
Run Code Online (Sandbox Code Playgroud)
在经过多次失败的测试后,SpecRun实际上会停止执行.可以使用以下行在.srprofile(EX:Default.srprofile)中指定此限制.
<Execution retryFor="None" stopAfterFailures="0" testThreadCount="1" testSchedulingMode="Sequential" />
Run Code Online (Sandbox Code Playgroud)
retryFor ="None"将告诉SpecRun如果断言失败则不重试测试.
stopAfterFailures ="0"将告诉SpecRun在任何失败后不要停止并继续.
| 归档时间: |
|
| 查看次数: |
2650 次 |
| 最近记录: |