Open saiparth opened 2 years ago
The alternative is the driver pattern: https://docs.specflow.org/projects/specflow/en/latest/Guides/DriverPattern.html For output please use our dedicated output api: https://docs.specflow.org/projects/specflow/en/latest/outputapi/outputapi.html
But why do you need or want this output?
Thanks for reply. Presently we are not using latest version of specflow and using the deprecated feature of calling steps within the steps. We are using custom framework wherein we read the result.xml of nunit CLI and show the console output in report.
If we upgrade specflow, I will have to directly call the step definition method and manually write the logs. I was thinking to use common method using reflection and pass all these methods as argument so that in run time we will fetch the attribute and value like - Given,"I launch browser" etc.
So though of checking any API provided by specflow before implementing the fix
It is marked as deprecated but not yet removed from 3.9.. So you can still upgrade to 3.9.
Hi @SabotageAndi
Can you pls share code path where specflow is finding the the method arguments and name?
Ex: for logging this to console
done: steps.WhenOpeningAllPage()
done: steps.WhenOpeningPage("something")
SpecFlow doesn't make this information public. The logging is using the data that is used to execute the method.
What's the alternative solution for calling steps from step definitions? (https://github.com/SpecFlowOSS/SpecFlow/issues/1733) We can directly call the methods, but we will loose console output which was logging the information like method name and passed arguments. we can log using reflection, but is there any specflow tool/method which already does this? Ex:
Log this