Created
March 25, 2011 14:41
-
-
Save marcusoftnet/886936 to your computer and use it in GitHub Desktop.
Here i'm using MvcContrib.Watin testhelper together with the SpecFlow hook for AfterScenario to capture a screen shot on each failing tests, naming the
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Specs.EndToEnd.Helpers; | |
using TechTalk.SpecFlow; | |
namespace Specs.EndToEnd | |
{ | |
[Binding] | |
public class SpecFlowHooks | |
{ | |
[AfterScenario] | |
public void AfterScenario() | |
{ | |
if(ScenarioContext.Current.TestError != null) | |
{ | |
WebBrowser.Driver.CaptureScreenShot(ScenarioContext.Current.ScenarioInfo.Title); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment