How to stop test runs in MTM forcibly RRS feed

  • Question

  • Hi,

    How can we stop test runs. When i manually tried to stop it it is freezing and hanging. So i am planning to stop it via TFS c# api (not rest api). I am able to stop it. but this approach is also taking more 5 minutes for each test run. How can we overcome this?

    In my case, once i initiated a build, more 5000 test cases in 250 test runs will be started. If anything goes wrong and i want to stop them immediately, how can i do that?


    Thursday, February 14, 2019 8:42 AM

All replies

  • Hello, 

    Simple answer is - you could not.

    Problem is - you need to do this when from "inside" when test already loaded and running and there are no option to terminate process process from inside.

    Partial solution is to crete on error some kind of external flag (file), check it on test initialization and fail test on initialization. Each test will be initialized, fail on init and result you can filtrate late.

    Another option is to re-write test runner. Example for this you can find in "UnitTest 3.0" sources.

    Sincerely, Highly skilled coding monkey.

    Thursday, February 14, 2019 9:00 AM