Forum Discussion

weototheheo's avatar
weototheheo
Occasional Contributor
11 years ago

TestComplete10 performance is very slow

Hi all,



I am using TC10 to create test script for Webpage. Its perfomance is very slow.

I found it was extremely slow when finding test Object and fill value in it.

How can I improve speed of test script?



My test script code is as below:

   var MotorCarrier = page["NativeWebObject"]["Find"]("id", "MotorCarrierZipCode");

   MotorCarrier["Keys"]("^a");

   MotorCarrier["Keys"]("[BS]");

   MotorCarrier["SetText"](valueList["Item"]("Zip Code"));

   MotorCarrier["Keys"]("[Tab]");



I referred below link but performance still can't be improved:

http://support.smartbear.com/articles/testcomplete/test-playback-performance-tips/



Thanks,

19 Replies

  • weototheheo's avatar
    weototheheo
    Occasional Contributor
    Hi Hanya,



    Thanks your suggestion.

    I will try replacing "page["NativeWebObject"]["Find"]" by "page["QuerySelector"](CSSSelector)".

    If  QuerySelector is faster than Find object, it is really good for my test script.



    Heo
  • weototheheo's avatar
    weototheheo
    Occasional Contributor
    Hi Hanya & all,



    I compared speed of Find method and QuerySelector method.

    Speed of QuerySelector is faster than Find about only 7%.

    +Control 1:

       QuerySelector: 0:00:33

       Find: 0:00:35

    +Control 2:

      QuerySelector: 0:00:35

       Find: 0:00:38

    However QuerySelector takes about 33s for searching a test object. It is also too slow.



    Thanks,

    Hien

  • Your results makes me think that you either have a very big and complex web page, either something is wrong with your test project or test environment. I suggest you to try to create a brand new test project and try the same search again first on some simple web page (like google.com), then on your tested web page. Let us know your results.

    What web browser are you using for testing?

  • weototheheo's avatar
    weototheheo
    Occasional Contributor
    Hi hanya,



    I tried finding test object in simple webpage(for example: LogOn,..).

    The more simple webpage, the smaller time it takes.



    I'm executing test script on Chrome v33.



    Thanks,

    Hien
  • I've just tried to find some element by its id on the big web page and it took much more time in Chrome than in IE.

    It seems that the only way to speed up the search is to use QuerySelector function of some  available parents of a sought element which is closest to it.
  • anandgoni's avatar
    anandgoni
    New Contributor
    Hi,



    Script recording is slow on chrome.

    When the xPath method is used script is taking more time to execute. Please help.



    Other details:

    Browser: Chrome 33

    Testcomplete 10.10

    Web application built on Java
  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Anand,


     


    Please answer the following questions:


    - Are you searching for an element starting from the page (Page.XPath) or from one of the parents?


    - Have you installed the Chrome 33 patch


     

  • anandgoni's avatar
    anandgoni
    New Contributor


    Hi Tanya,



    Yes, sample scripts are provided below.





    1.page.Panel(1).Panel("IDLOOKUPTABLETABS").Panel("IDLOOKUPTABLETABSTAB1").Frame("IDTABLECRUDPANEL").EvaluateXPath(lib.getxmlvaluebyNode(filepath_Obj,"btnSave"))

    2. sys.Browser(BrowserType).Page(applicationpath).EvaluateXPath(lib.getxmlvaluebyNode(filepath_Obj,"IdField"))



    Yes i added chrome 33 patches and there is no improvement in the speed.

    Even it is taking more time in object spy as well.



    Thanks,



  • What extensions to you have switched on?



    File > Install Extensions



    What is checked in there?



    I had to disable all but the ones I needed to get performance back. Chrome was one of the worst affected for me.