nunit-console icon indicating copy to clipboard operation
nunit-console copied to clipboard

Does Nunit ITestEventListener support async handler for OnTestEvent

Open puagarwa opened this issue 1 year ago • 1 comments

I am writing a custom reporter by writing a Nunit extension via ITestEventListener as mentioned in the Nunit document here.

I have some requirement where i would like to implement OnTestEvent as async handler. I didnt find any document around it, hence checking if Nunit support async handler for it.

Another minor question is around console out, i observe console out lines from extension are not showing up in console, for now i am getting around this by writing into a file but i like to see if there is way to flow logs at console form extension.

puagarwa avatar Mar 31 '24 12:03 puagarwa

  1. There is no async support there. Could be something for the future, but it would be a long shot, as we're currently out of resources.
  2. Console: Never tried that, but the engine in itself doesn't have any console to write to (as NUnit traps the output) If you look at the resultwriter, there is code showing the console reportwriter. That might give you some ideas. But it will depend on how you're running the engine, NUnit.console or adapter, and how they capture the stdout. Also, have a look at this doc: https://docs.nunit.org/articles/nunit/technical-notes/nunit-internals/specs/Internal-Trace-Spec.html

Btw. moving this to the console/engine repo, since this is a question related to the engine.

OsirisTerje avatar Apr 05 '24 19:04 OsirisTerje

Answered

CharliePoole avatar Jun 05 '24 04:06 CharliePoole