アサーションが含まれているシナリオが機能ファイルにたくさん書かれています。最初のシナリオがアサーションに失敗した場合、Specflowはその後に続くすべてのシナリオをスキップします。NUnitの場合と同じように、シナリオの1つが失敗しても、すべてのシナリオを実行し続けたいと思います。SpecRunをテストプロバイダーとして使用していますが、SpecFlowWebサイトで役立つものは見つかりませんでした。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>
SpecRunは、いくつかのテストが失敗した後、実際に実行を停止します。この制限は、次の行で.srprofile(EX:Default.srprofile)で指定できます。
<Execution retryFor="None" stopAfterFailures="0" testThreadCount="1" testSchedulingMode="Sequential" />
restartFor = "None"は、アサーションに失敗した場合にテストを再試行しないようにSpecRunに指示します。
stopAfterFailures = "0"は、失敗後に停止せずに続行するようにSpecRunに指示します。
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加