For my SpecFlow tests, I want to setup an individual logging / tracing of the test progress during the execution of tests. E.g. i want to write
- all passed / failed steps
- started / ended scenarios
- started / ended features
to the windows event log (in order to synchronize it with event log messages generated by other system components during the test).
I tried to use the [BeforeFeature], [BeforeScenario], [BeforeStep] Hooks for doing that, but it turned out that I do not have all the required information within this hooks. E.g. i do not know how to get the current text line of the current step executed (including line information, etc.) or the result (failed / passed) of the current step.
Is there a way to get this information within those hooks or in any other way during the execution of the test?
If not: Is there a way to customize the trace output created by Specflow in any other way?
scenario
got executed and what was theTest Outcome
. I want to log this into aCSV
file. I am usingSerilog
. How can I achieve that? – Apoorv