Invoking additional actions before the MST has timed out kills process threads

When the C # validation method exceeds the timeout, the MSTest test agent enforces the test and all child threads / processes. TestCleanup()then called to help with any additional tearing actions.

I need a way to capture additional registration information, such as calling screen capture or collecting additional system / application text logs, before . MSTest terminates all processes. I already have methods and functions to capture these logs. The problem is timing.

Is there a way to specify additional tasks or actions after the method test expires before MSTest kills all the processes? I believe that I could encode a timeout loop inside my test method, but then I have to do this for all test methods, and this is not preferable.

+4
source share

Source: https://habr.com/ru/post/1537779/


All Articles