locked
Slow performance when I use Coded UI, how can I tune the performance for test execution? RRS feed

  • Question

  • Dear all

    I use VS2010 Premium Edition with SP1 and HF installed. And I use Coded UI Testing WinForm application

    I will have over 200 test method running and I find that it spend 3-5 second for each mouse click or data entry.

    I want to know whether

    1. there is think time during script recording to be inserted?

    2. is there any method that I can tune to make the test execution faster?

    Best Regards

    Thursday, April 11, 2013 12:03 PM

Answers

All replies

  • Hello,

    Thank you for your post.

    As far as I know, when you record actions using Coded UI Test Builder, we can’t add a so-called ‘think time’. And we just can add some wait for time during coded UI test running.

    Please see: Making Coded UI Tests Wait For Specific Events During Playback

    It seems that you are using HF(High frequency) to detect the individual time of each mouse click or data entry. HF is a third party tool which is not supported. I am not familiar with HF and don’t know its time calculating engine for mouse click or data entry. I don’t think that the mouse click time which is calculated by HF is the actual time which mouse click spends during coded UI test playback.

    In addition, sometimes the playback speed may be related to the machine performance at that time.

    AS I know there is no feature to faster mouse click in coded UI test. But we can improve performance of Coded UI test playback through some playback settings which are provided in the following blog:

    http://blogs.msdn.com/b/visualstudioalm/archive/2012/02/01/guidelines-on-improving-performance-of-coded-ui-test-playback.aspx

    Configuring Playback in Visual Studio 2010

    You can apply those playback settings based on your actual situation.

    In addition, the reason of control/data input responding slowly could be something more than the input not reaching its destination window. First thing you can try out in such scenario is validate if any explicit introduced delay (such as Playback.Wait()) fixes the issue. If not, you may then try to raise the robustness level of WaitForReadyLevel to AllThreads ( by default it is UIThreadOnly).

    For more information, see Resilience issues with mouse action section in the follwoing blog: http://blogs.msdn.com/b/tapas_sahoos_blog/archive/2011/11/07/troubleshooting-record-and-playback-issues-in-coded-ui-test.aspx

    Hope it can help you.

    Bets regards,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.


    • Edited by Amanda Zhu Friday, April 12, 2013 7:54 AM
    • Marked as answer by Amanda Zhu Friday, April 19, 2013 5:11 AM
    Friday, April 12, 2013 4:55 AM
  • Dear Amanda,

    Another time consuming part is to initialize the test, I see when I start the MSTest to particular group of test method, from running MSTest to start of testing method execution, I find it nearly 30-60 seconds, also that it require 10-20 seconds from one test to another test inside one MSTest session.

    Do you know any tuning I can do for this, whats' the best practise for this area?
    Best Regards

    Tuesday, April 16, 2013 2:55 AM
  • Hello,

    In this thread, we are mainly discussing about “coded UI test spend 3-5 second for each mouse click or data entry.” Since your new question is not directly related to the original issue, it would be better if you open up a new thread for the new question. In this way, our discussion here will not deviate too much from the original issue. This will make answer searching in the forum easier and be beneficial to other community members as well.

    Thank you for your understanding.

    Best regards,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, April 16, 2013 5:00 AM