jeudi 31 mars 2016

Why is my Specflow [AfterTestRun] hook called twice

[AfterTestRun]

This hook for me is being called twice.

My C# code is correct and at the end of each Scenario I am saving my results to a Concurrent Bag.

Then I use the [AfterTestRun] hook to call the Concurrent Bag and save the data to a database. I see duplicated data, so I assume it’s being called twice.

Additional Info:
I am using SpecRun to run my tests in parallel with the following profile

Execution stopAfterFailures="1" retryCount="0" testThreadCount="3" testSchedulingMode="Sequential"

Also, how will this hook behave if one has multiple scenarios within each feature? Currently I have 1.

Thanks

Aucun commentaire:

Enregistrer un commentaire