You will need to create an instance of an ITestLogger and add this to the current runner:
TDUnitX.CurrentRunner().AddLogger(myLogger);
The ITestLogger has a lot of methods that allows for reading out a lot of detailed information. DUnitX comes with a variety of loggers, but there isn't really anything that fits our use case here.
I suggest to
Create a new class, derive from TDUnitXNullLogger from DUnitX.Loggers.Null
You will need to create an instance of an
ITestLoggerand add this to the current runner:The
ITestLoggerhas a lot of methods that allows for reading out a lot of detailed information. DUnitX comes with a variety of loggers, but there isn't really anything that fits our use case here.I suggest to
TDUnitXNullLoggerfromDUnitX.Loggers.Nullprocedure OnBeginTest(const threadId: TThreadID; const Test: ITestInfo);Test.MethodNamefor later useAn instance of your new class could be created in the
SetUpFixturemethod of your test case.Caveat: You can add your logger to
TDUnitX.CurrentRunner()but I have found no public way of removing it when it is no longer needed.Here is the complete example: