Reputation: 427
How do I read the scenario running time programmatically?
I can see it in visual studio however I am not able to read this value.
(I have currently implemented a stopWatch to get the timer, however, it would make my code cleaner if I just used something from Specflow.)
Upvotes: 2
Views: 748
Reputation: 5825
There is an internal Stopwatch on the ScenarioContext: https://github.com/techtalk/SpecFlow/blob/master/TechTalk.SpecFlow/ScenarioContext.cs#L57
If you provide a PR that makes the Elapsed property of it accessible for the outside, I am happy to merge it in.
Upvotes: 1