Runtime tracer plug-in #500
-
I want to implement a Reqnroll Runtime plugin that makes it possible to include Reqnroll logging (steps, hooks, ...) in the output during test execution. The output can be a file or console, but the plug-in is not aware of it. The plug-in should be somehow configured for the correct type. How can I implement a runtime plug-in which can be loaded with the correct type of logging (either file or console) so that all logging will be written? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Implement a class like this
...and register it in the plugin Initialize-method As you are overwriting the tracer you have to ensure that no other plugin is overwriting it again. |
Beta Was this translation helpful? Give feedback.
Reqnroll has no built in notion of configurable logging.
The ITraceListener is an abstraction used to route Reqnroll output back to the hosting Test Framework (NUnit, MsTest, etc).
If you can accept that such logging should go to the test framework(and configure logging therein), then your plug-in should use the registered ITraceListener.