I am having trouble detecting Inconclusive test results in the [AfterScenario] hook.
I've got a large suite of Specflow tests that I run most nights and in the hooks section I am logging whether the test passed or failed and some info on the tags, then at the end of the test run I output this to a file. I am currently deciding whether a test has passed or failed by doing:
bool failed = ScenarioContext.Current.TestError != null;
string result = failed ? "failed" : "passed";
This works most of the time, but when a test doesn't have all the steps completed (scenario result is inconclusive) that method reports the scenario as passing, which isn't really what I want. I've tried setting missingOrPendingStepsOutcome to error or ignore in App.Config, but neither of them have any effect upon the TestError property, so again it'll get calculated as "passed".
I've noticed a couple of handy-looking properties ( MissingSteps and PendingSteps ) in the ScenarioContext.Current, unfortunately they're private, so I can't access them.
I am using C#.4.5.2 and Specflow 1.9.0.77 with NUnit 2.6.4.14350 and running the tests in ReSharper 9.2's Unit Test Sessions window in Visual Studio Enterprise 2015 on Windows 7 x64