Handling test errors – boost your error reporting
If you already have a bunch of executable scenarios and you are running them on your CI server, you have probably realized that detailed information about failing tests can be life-saver (this was one of the reasons why developed SpecFlow+ Runner). For example, you may want to attach a screenshot of your automated web browser to the exception trace. Let’s do it, the hooks and the ScenarioContext are here to help!
ScenarioContext instance contains a lot of useful information about the currently executing scenarios, like the scenario tags, the current step block (given, when or then) and the last exception. Combining this with an
[AfterScenario] hook, you can provide more details on scenarios execution failures.
You can find examples and more details in the documentation.