none
Unit Test executes for a very long time

    Question

  • Hi,

    I have a solution with 400+ unit tests, I tried to execute this through command line MSTest.exe it executed in 2-3 minutes. But when I had configured this to a TFS build, the solution compiles and builds properly but the test cases are executing for a longer time... even after 24 hours of execution it still doesnt end... Please let me know how to troubleshoot this issue

    Thanks

    Arun

    Monday, March 05, 2012 5:57 AM

Answers

All replies

  • Hi Arun,

      Here are the possible reasons.
    1. The tests are might NOT be returning/quitting or waiting for a process to complete
    2. If the tests are connecting to external applications, you might need to check the windows firewall settings on the build machine to verify whether the calls are being blocked.
    3. You could enable logging on MSTest.exe to investigate more. I have blogged the details steps http://my2centsontfs.blogspot.com/2012/03/enabling-logging-on-mstestexe.html

    Regards,
    Adhi
    My TFS Blog
    Please remember to mark as answered, if this reply helps

    Monday, March 05, 2012 7:05 PM
  • Hi Arun,

    Thanks for your post.

    For this issue, Adhi provided us the better suggestion, please confirm that.

    Additionally, open build detailed log>>under View Logsection, check which detailed steps or activities cost the most time(Duration).  


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us

    Tuesday, March 06, 2012 6:11 AM