So I am using SpecFlow with NUnit for developing end-to-end acceptance tests of a web application with Selenium. One of the things we do to try to gauge the nature of a failure, is to take a screenshot of the browser whenever a regression test fails. I am currently doing it by wrapping each of my tests in try/catch blocks, and taking the screenshot in the catch with Selenium then, rethrowing the exception. This works, but it makes the tests messier and more tedious.
Is there a way in either NUnit or SpecFlow to call a hook when any test fails, before any teardown method is called?