locked
Trace from ClassCleanup RRS feed

  • Question

  • Hi,

    Is it possible to see trace statements from the ClassCleanup method with the test logs?

    I know I tripped over some info about this at some stage in the past but cannot find it now - apologies.

    Thanks

    Donal
    Tuesday, October 13, 2009 1:45 PM

Answers

  • Hello Donal,

    As I know, we could see nearly the same result in the output window ( View-Output ) as what we can see from DebugView if we debug the test. (Go to test view, right click the test you want to run and select 'Debug Selection').
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Send us any feedback you have about the help from MSFT at EMAIL GONE.
    • Marked as answer by Donal McWeeney Friday, October 16, 2009 11:34 AM
    Friday, October 16, 2009 6:09 AM
    Moderator

All replies

  • Hello Donal,

    Could you please offer more detailed information so the community members could help you quicker and better?

    Thank you for your understanding.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Send us any feedback you have about the help from MSFT at EMAIL GONE.
    Thursday, October 15, 2009 6:53 AM
    Moderator
  • Ok, In my static ClassCleanup method there are some cleanup actions and explicit object disposal I am doing and I would like to get this logged somewhere. The only way I can see to do this is to use the System.Diagnostics.Trace methods to output to a trace.

    When you use Trace from testinitialize or testcleanup it gets displayed on the log for the test run. However trace calls from ClassCleanup do not appear in any of the test logs or test windows in VS. I'm wondering is there a way to see this from inside visual studio or do I need to always use a tool like DebugView to see these messages.

    Thanks

    Donal
    Thursday, October 15, 2009 10:45 AM
  • Hello Donal,

    As I know, we could see nearly the same result in the output window ( View-Output ) as what we can see from DebugView if we debug the test. (Go to test view, right click the test you want to run and select 'Debug Selection').
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Send us any feedback you have about the help from MSFT at EMAIL GONE.
    • Marked as answer by Donal McWeeney Friday, October 16, 2009 11:34 AM
    Friday, October 16, 2009 6:09 AM
    Moderator
  • Hi Edwer,

    Thanks for the info. I guess it is partially what I am looking for.

    Thanks

    Donal
    Friday, October 16, 2009 11:35 AM