nunit / nunit-console

NUnit Console runner and test engine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does Nunit ITestEventListener support async handler for OnTestEvent

puagarwa opened this issue · 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.

  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.

Answered