[DUnitX] TestInsight does not show Leaked Tests

Issue #51 resolved
Aleksandar Damjanovic created an issue

I was playing around with DUnitX and activated FastMM4 for checking memleaks and as the title says, it seems like TestInsight does not show leaked tests at all.

Is there anyone around who can verify this behaviour? (testproject has been attached)

@@Stefan: the tests ExplicitlyFreeingAnInterfaceMockShouldNotLeakMemory and NotFreeingAnInterfaceMockShouldNotLeakMemory also should not leak at all, but this relates to dunitx/fastmm i guess

Kind Regards, Aleks

Comments (9)

  1. Stefan Glienke repo owner
    • changed status to open

    TTestInsightLogger.OnTestMemoryLeak is missing an implementation. Until the next version you can fix that for yourself by adding: PostTestResult(TResultType.Warning, Test);

    PostTestResult might need some more code - I don't know currently how DUnitX provides the information about the leak.

    Edit: Ok, I guess

    testResult.ExceptionMessage := test.Message;
    

    might be enough. That would also possibly fix Issue #48

  2. Aleksandar Damjanovic reporter

    Yes, it looks like you need more code there, at least to display the real reason of the produced warning (which will be empty by using "PostTestResult(TResultType.Warning, Test)")

  3. Aleksandar Damjanovic reporter

    But that helps a lot ;-) By the way, are there any plans to "open-source" TestInsight ?

  4. Log in to comment