Thread overview
Feedback to stdout when a specific unittest is run
Jul 23, 2020
Per Nordlöw
Jul 23, 2020
Per Nordlöw
July 23, 2020
Is it possible to activate some feedback print to stdout when a unittest is started and ended to track which unittests that take the longest to execute?

Alternatively inject a hook being run before each test is run.
July 23, 2020
On Thursday, 23 July 2020 at 15:10:50 UTC, Per Nordlöw wrote:
> Is it possible to activate some feedback print to stdout when a unittest is started and ended to track which unittests that take the longest to execute?
>
> Alternatively inject a hook being run before each test is run.

I found https://code.dlang.org/packages/silly

Problem solved.
July 23, 2020
On 7/23/20 11:10 AM, Per Nordlöw wrote:
> Is it possible to activate some feedback print to stdout when a unittest is started and ended to track which unittests that take the longest to execute?
> 
> Alternatively inject a hook being run before each test is run.

Yes, you can copy the code [1], and handle the unittest runtime yourself [2], putting in whatever outputs you wish.

-Steve

[1] https://github.com/dlang/druntime/blob/d19c70b6130d70e6d727cd573230e4519eb0ef55/src/core/runtime.d#L602-L641
[2] https://dlang.org/phobos/core_runtime.html#.Runtime.extendedModuleUnitTester